The deque elements in Connection are accessed both by the Server thread and the one that enqueues via Server::send. This is a race condition as std::deque is not thread safe.
Hotfix: Use a mutex in Server both in the Connection::update and the Connection::send calls.
Great lib!
Found this:
The deque elements in
Connection
are accessed both by theServer
thread and the one that enqueues viaServer::send
. This is a race condition asstd::deque
is not thread safe.Hotfix: Use a mutex in
Server
both in theConnection::update
and theConnection::send
calls.Betterfix: Use this lock free FIFO structure