Commit eedd7668 authored by Jelte Jansen's avatar Jelte Jansen
Browse files

[master] fix for bsd/osx timeout error

Check if socket has not been closed after timeout in read

discussed on jabber
parent 34955bf9
......@@ -161,6 +161,13 @@ TCPServer::operator()(asio::error_code ec, size_t length) {
CORO_YIELD return;
}
// Due to possible timeouts and other bad behaviour, after the
// timely reads are done, there is a chance the socket has
// been closed already. So before we move on to the actual
// processing, check that, and stop if so.
if (!socket_->is_open()) {
CORO_YIELD return;
}
// Create an \c IOMessage object to store the query.
//
......
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