diff --git a/runtime/include/http_session.h b/runtime/include/http_session.h index 743b7de..6f7998a 100644 --- a/runtime/include/http_session.h +++ b/runtime/include/http_session.h @@ -457,7 +457,7 @@ http_session_send_response(struct http_session *session, void_star_cb on_eagain) if (unlikely(rc == -EAGAIN)) { goto DONE; } else if (unlikely(rc < 0)) { - goto ERR; + goto CLOSE; } rc = http_session_send_response_body(session, on_eagain); @@ -465,14 +465,14 @@ http_session_send_response(struct http_session *session, void_star_cb on_eagain) if (unlikely(rc == -EAGAIN)) { goto DONE; } else if (unlikely(rc < 0)) { - goto ERR; + goto CLOSE; } session->response_sent_timestamp = __getcycles(); -DONE: - return; -ERR: +CLOSE: http_session_close(session); http_session_free(session); +DONE: + return; } diff --git a/tests/traps/Makefile b/tests/traps/Makefile index e3285b0..c609122 100644 --- a/tests/traps/Makefile +++ b/tests/traps/Makefile @@ -31,6 +31,7 @@ debug: sledgert trap_divzero LD_LIBRARY_PATH=${SLEDGE_BINARY_DIR} gdb ${SLEDGE_BINARY_DIR}/sledgert \ --eval-command="handle SIGUSR1 noprint nostop" \ --eval-command="handle SIGPIPE noprint nostop" \ + --eval-command="handle SIGFPE noprint nostop" \ --eval-command="set pagination off" \ --eval-command="run spec.json" @@ -38,7 +39,7 @@ client-ok: echo "1" | http :10000/divide client-trap: - echo "0" | http :10000/divide + echo "0" | http --timeout 3600 :10000/divide client-trap2: echo "-1" | http :10000/divide