fixed possible crash when connection was destructed while it was still busy resolving the domain name
This commit is contained in:
parent
1370afee94
commit
41b07672e0
|
|
@ -152,6 +152,9 @@ public:
|
|||
{
|
||||
// stop monitoring the pipe filedescriptor
|
||||
_handler->monitor(_connection, _pipe.in(), 0);
|
||||
|
||||
// wait for the thread to be ready
|
||||
_thread.join();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -165,9 +168,6 @@ public:
|
|||
// only works if the incoming pipe is readable
|
||||
if (fd != _pipe.in() || !(flags & readable)) return this;
|
||||
|
||||
// wait for the thread to be ready
|
||||
_thread.join();
|
||||
|
||||
// do we have a valid socket?
|
||||
if (_socket >= 0) return new TcpConnected(_connection, _socket, std::move(_buffer), _handler);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue