fix: correct flush when zero blocking

master
Sean McBride 3 years ago
parent 1db1f9a396
commit 5fa65d2f0b

@ -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;
}

@ -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

Loading…
Cancel
Save