respect Connection: close

This commit is contained in:
zefie
2021-08-07 18:34:56 -04:00
parent 00f80c9ea5
commit c09d0d6989

View File

@@ -638,7 +638,7 @@ async function sendToClient(socket, headers_obj, data, compress_data = false) {
if (socket_sessions[socket.id].close_me) socket.end();
if (headers_obj["Connection"]) {
if (headers_obj["Connection"].toLowerCase() == "close" && wtv_connection_close == "true") {
if (headers_obj["Connection"].toLowerCase() == "close" || wtv_connection_close == "true") {
socket.destroy();
}
}