(server) give thread name to some usual worker threads / unittest is broken !!

This commit is contained in:
Benjamin Sergeant 2020-02-23 09:44:58 -08:00
parent 8837d5e784
commit 4a9b0b9dfd
4 changed files with 13 additions and 1 deletions

View File

@ -1,4 +1,4 @@
name: C/C++ CI
name: unittest
on: [push]

View File

@ -1,6 +1,10 @@
# Changelog
All changes to this project will be documented in this file.
## [8.1.5] - 2020-02-23
(server) give thread name to some usual worker threads / unittest is broken !!
## [8.1.4] - 2020-02-22
(websocket server) fix regression from 8.1.2, where per-deflate message compression was always disabled

View File

@ -7,6 +7,7 @@
#include "IXSocketServer.h"
#include "IXNetSystem.h"
#include "IXSetThreadName.h"
#include "IXSocket.h"
#include "IXSocketConnect.h"
#include "IXSocketFactory.h"
@ -247,6 +248,8 @@ namespace ix
// Set the socket to non blocking mode, so that accept calls are not blocking
SocketConnect::configure(_serverFd);
setThreadName("SocketServer::listen");
for (;;)
{
if (_stop) return;
@ -347,6 +350,8 @@ namespace ix
void SocketServer::runGC()
{
setThreadName("SocketServer::GC");
for (;;)
{
// Garbage collection to shutdown/join threads for closed connections.

View File

@ -7,6 +7,7 @@
#include "IXWebSocketServer.h"
#include "IXNetSystem.h"
#include "IXSetThreadName.h"
#include "IXSocketConnect.h"
#include "IXWebSocket.h"
#include "IXWebSocketTransport.h"
@ -73,6 +74,8 @@ namespace ix
void WebSocketServer::handleConnection(std::shared_ptr<Socket> socket,
std::shared_ptr<ConnectionState> connectionState)
{
setThreadName("WebSocketServer::" + connectionState->getId());
auto webSocket = std::make_shared<WebSocket>();
_onConnectionCallback(webSocket, connectionState);