Software /
code /
prosody
Changeset
13341:407174990ab0
net.http.server: Complete async waiter for non-persistent connections
Otherwise requests with Connection: close would be stuck in the async
wait that starts after the handle_request() call.
Together with the new async debugging, this makes the async thread stay
in the set of waiting runners forever, where previously it would simply
be garbage collected.
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 24 Nov 2023 00:31:08 +0100 |
parents | 13340:92b7ccc76c3a |
children | 13342:d0a9b631a937 |
files | net/http/server.lua |
diffstat | 1 files changed, 2 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/net/http/server.lua Thu Nov 23 17:49:57 2023 +0100 +++ b/net/http/server.lua Fri Nov 24 00:31:08 2023 +0100 @@ -407,9 +407,8 @@ response:on_destroy(); response.on_destroy = nil; end - if response.persistent then - response:finish_cb(); - else + response:finish_cb(); + if not response.persistent then response.conn:close(); end end