diff --git a/net/http/server.lua b/net/http/server.lua index 3d7d52b7a..88907fcc1 100644 --- a/net/http/server.lua +++ b/net/http/server.lua @@ -407,9 +407,8 @@ function _M.finish_response(response) 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