Skip to content

Fixed a race between bind() and stop()

quobert requested to merge quobert/Simple-Web-Server:start-stop-race into master

There is a race on the acceptor between bind() and stop(). It is fixed by synchronizing the two methods. Additionally, stop() marks the server to be stopped now. Subsequent calls to start(), bind() or accept_and_run() return immediately until reset() is called.

Edited by quobert

Merge request reports