async-sockets-cpp icon indicating copy to clipboard operation
async-sockets-cpp copied to clipboard

Data race

Open ArdxWe opened this issue 3 years ago • 0 comments

https://github.com/eminfedar/async-sockets-cpp/blob/a17b3e157fba5d97f57c7b42f2d3e72de24d4a10/async-sockets/include/tcpserver.hpp#L67

For listen thread, we are reading it, but in the main thread, we may close it and write to it.

Maybe we should use mutex or atomic bool instead.

ArdxWe avatar Mar 19 '22 08:03 ArdxWe