ofxLibwebsockets
ofxLibwebsockets copied to clipboard
Race condition
Great lib!
Found this:
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.
Betterfix: Use this lock free FIFO structure