websocket and http server: server does not close the bound client socket in many cases

This commit is contained in:
Benjamin Sergeant 2019-09-09 16:48:26 -07:00
parent 7080c5679f
commit fb271953f7
5 changed files with 10 additions and 3 deletions

View File

@ -1 +1 @@
6.1.0
6.2.0

View File

@ -1,6 +1,10 @@
# Changelog
All notable changes to this project will be documented in this file.
## [6.2.0] - 2019-09-09
- websocket and http server: server does not close the bound client socket in many cases
## [6.1.0] - 2019-09-08
- move poll wrapper on top of select (only used on Windows) to the ix namespace

View File

@ -95,6 +95,7 @@ namespace ix
}
}
connectionState->setTerminated();
Socket::closeSocket(fd);
_connectedClientsCount--;
}

View File

@ -93,7 +93,7 @@ namespace ix
else
{
std::stringstream ss;
ss << "WebSocketServer::handleConnection() error: "
ss << "WebSocketServer::handleConnection() HTTP status: "
<< status.http_status
<< " error: "
<< status.errorStr;
@ -111,6 +111,8 @@ namespace ix
logInfo("WebSocketServer::handleConnection() done");
connectionState->setTerminated();
Socket::closeSocket(fd);
}
std::set<std::shared_ptr<WebSocket>> WebSocketServer::getClients()

View File

@ -6,4 +6,4 @@
#pragma once
#define IX_WEBSOCKET_VERSION "6.1.0"
#define IX_WEBSOCKET_VERSION "6.2.0"