fix disconnect for websocket clients

This commit is contained in:
Martin Michelsen
2025-07-08 20:09:14 -07:00
parent 3025420aea
commit ae9eaccd29
+5 -3
View File
@@ -205,9 +205,11 @@ protected:
if (resp) {
co_await c->send_http_response(*resp);
}
auto* conn_header = req.get_header("connection");
if (!conn_header || (*conn_header != "keep-alive")) {
c->r.close();
if (!c->is_websocket) {
auto* conn_header = req.get_header("connection");
if (!conn_header || (*conn_header != "keep-alive")) {
c->r.close();
}
}
}