0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-12-26 07:23:53 +01:00

ircd::net: Set socket non-blocking after handshake.

This commit is contained in:
Jason Volk 2019-04-12 05:49:22 -07:00
parent e90d016d2e
commit 79475d2ba3

View file

@ -1634,9 +1634,6 @@ noexcept try
return;
}
// Toggles the behavior of non-async functions; see func comment
blocking(*sock, false);
static const socket::handshake_type handshake_type
{
socket::handshake_type::server
@ -1765,6 +1762,10 @@ noexcept try
check_handshake_error(ec, *sock);
sock->cancel_timeout();
// Toggles the behavior of non-async functions; see func comment
blocking(*sock, false);
assert(bool(cb));
cb(*listener_, sock);
}
@ -3056,9 +3057,6 @@ noexcept try
if(ec)
return call_user(callback, ec);
// Toggles the behavior of non-async functions; see func comment
blocking(*this, false);
// Try to set the user's socket options now; if something fails we can
// invoke their callback with the error from the exception handler.
if(opts.sopts)
@ -3182,6 +3180,9 @@ noexcept try
};
#endif
// Toggles the behavior of non-async functions; see func comment
blocking(*this, false);
// This is the end of the asynchronous call chain; the user is called
// back with or without error here.
call_user(callback, ec);