Commit 03103c7e authored by Benoit Eudier's avatar Benoit Eudier

Change isBound to check local Fd instead of global fd

Use of global FD creates problem when using multiple listener in the
same executable. E.g.: Create and bind a listener in a thread, then
create and immediately destroy another listener -> runtime exception.
parent 38b66fff
......@@ -200,7 +200,7 @@ Listener::bind(const Address& address) {
bool
Listener::isBound() const {
return g_listen_fd != -1;
return listen_fd != -1;
}
void
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment