diff options
Diffstat (limited to 'net/server/http_server.cc')
-rw-r--r-- | net/server/http_server.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/net/server/http_server.cc b/net/server/http_server.cc index 42d5752..6f2a46b 100644 --- a/net/server/http_server.cc +++ b/net/server/http_server.cc @@ -80,7 +80,9 @@ void HttpServer::Close(int connection_id) if (connection == NULL) return; - connection->DetachSocket(); + // Initiating close from server-side does not lead to the DidClose call. + // Do it manually here. + DidClose(connection->socket_); } // @@ -237,7 +239,8 @@ void HttpServer::DidRead(ListenSocket* socket, if (result == WebSocket::FRAME_INCOMPLETE) break; - if (result == WebSocket::FRAME_ERROR) { + if (result == WebSocket::FRAME_CLOSE || + result == WebSocket::FRAME_ERROR) { Close(connection->id()); break; } |