0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-02 13:48:53 +02:00

ircd::net: Hit cancel() before any of the disconnect sequences.

This commit is contained in:
Jason Volk 2018-01-23 16:22:25 -08:00
parent fffea204b9
commit e99b32a176

View file

@ -1311,6 +1311,7 @@ try
in.bytes, in.bytes,
out.bytes); out.bytes);
cancel();
if(opts.sopts) if(opts.sopts)
set(*this, *opts.sopts); set(*this, *opts.sopts);
@ -1339,7 +1340,6 @@ try
std::bind(&socket::handle_disconnect, this, shared_from(*this), std::move(callback), ph::_1) std::bind(&socket::handle_disconnect, this, shared_from(*this), std::move(callback), ph::_1)
}; };
cancel();
set_timeout(opts.timeout); set_timeout(opts.timeout);
ssl.async_shutdown(std::move(disconnect_handler)); ssl.async_shutdown(std::move(disconnect_handler));
return; return;