Shorter socket-timeouts after WebSocket::end() (#1245) (#1246)

This commit is contained in:
Mark Plomer
2021-08-28 21:27:32 +02:00
committed by GitHub
parent 6048d026d0
commit 501c090ef5
3 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -364,7 +364,7 @@ private:
auto *webSocketData = (WebSocketData *)(us_socket_ext(SSL, s));
auto *webSocketContextData = (WebSocketContextData<SSL, USERDATA> *) us_socket_context_ext(SSL, us_socket_context(SSL, (us_socket_t *) s));
if (webSocketContextData->sendPingsAutomatically && !webSocketData->hasTimedOut) {
if (webSocketContextData->sendPingsAutomatically && !webSocketData->isShuttingDown && !webSocketData->hasTimedOut) {
webSocketData->hasTimedOut = true;
us_socket_timeout(SSL, s, webSocketContextData->idleTimeoutComponents.second);
/* Send ping without being corked */