websocket and http server: server does not close the bound client socket in many cases
This commit is contained in:
		| @@ -1 +1 @@ | |||||||
| 6.1.0 | 6.2.0 | ||||||
|   | |||||||
| @@ -1,6 +1,10 @@ | |||||||
| # Changelog | # Changelog | ||||||
| All notable changes to this project will be documented in this file. | 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 | ## [6.1.0] - 2019-09-08 | ||||||
|  |  | ||||||
| - move poll wrapper on top of select (only used on Windows) to the ix namespace | - move poll wrapper on top of select (only used on Windows) to the ix namespace | ||||||
|   | |||||||
| @@ -95,6 +95,7 @@ namespace ix | |||||||
|             } |             } | ||||||
|         } |         } | ||||||
|         connectionState->setTerminated(); |         connectionState->setTerminated(); | ||||||
|  |         Socket::closeSocket(fd); | ||||||
|  |  | ||||||
|         _connectedClientsCount--; |         _connectedClientsCount--; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -93,7 +93,7 @@ namespace ix | |||||||
|         else |         else | ||||||
|         { |         { | ||||||
|             std::stringstream ss; |             std::stringstream ss; | ||||||
|             ss << "WebSocketServer::handleConnection() error: " |             ss << "WebSocketServer::handleConnection() HTTP status: " | ||||||
|                << status.http_status |                << status.http_status | ||||||
|                << " error: " |                << " error: " | ||||||
|                << status.errorStr; |                << status.errorStr; | ||||||
| @@ -111,6 +111,8 @@ namespace ix | |||||||
|  |  | ||||||
|         logInfo("WebSocketServer::handleConnection() done"); |         logInfo("WebSocketServer::handleConnection() done"); | ||||||
|         connectionState->setTerminated(); |         connectionState->setTerminated(); | ||||||
|  |  | ||||||
|  |         Socket::closeSocket(fd); | ||||||
|     } |     } | ||||||
|  |  | ||||||
|     std::set<std::shared_ptr<WebSocket>> WebSocketServer::getClients() |     std::set<std::shared_ptr<WebSocket>> WebSocketServer::getClients() | ||||||
|   | |||||||
| @@ -6,4 +6,4 @@ | |||||||
|  |  | ||||||
| #pragma once | #pragma once | ||||||
|  |  | ||||||
| #define IX_WEBSOCKET_VERSION "6.1.0" | #define IX_WEBSOCKET_VERSION "6.2.0" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user