server unittest for validating client request / new timeout cancellation handling (need refactoring)

This commit is contained in:
Benjamin Sergeant
2019-01-02 16:08:32 -08:00
parent c6adc00eac
commit 097c7e5397
10 changed files with 280 additions and 44 deletions

View File

@ -219,19 +219,22 @@ namespace ix
}
auto status = webSocket->connectToSocket(fd);
if (!status.success)
if (status.success)
{
// Process incoming messages and execute callbacks
// until the connection is closed
webSocket->run();
}
else
{
std::stringstream ss;
ss << "WebSocketServer::handleConnection() error: "
<< status.http_status
<< " error: "
<< status.errorStr;
logError(ss.str());
return;
}
// Process incoming messages and execute callbacks
// until the connection is closed
webSocket->run();
// Remove this client from our client set
{
std::lock_guard<std::mutex> lock(_clientsMutex);