mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
ircd::net: Return ENOTCONN from net::check(socket) in fini state.
This commit is contained in:
parent
4ed000e6ab
commit
4c7f53fda9
1 changed files with 7 additions and 1 deletions
|
@ -3168,9 +3168,12 @@ noexcept
|
|||
buf
|
||||
};
|
||||
|
||||
if(unlikely(!sd.is_open()))
|
||||
if(!sd.is_open())
|
||||
return make_error_code(std::errc::bad_file_descriptor);
|
||||
|
||||
if(fini)
|
||||
return make_error_code(std::errc::not_connected);
|
||||
|
||||
std::error_code ret;
|
||||
if(SSL_peek(ssl.native_handle(), buf, sizeof(buf)) > 0)
|
||||
return ret;
|
||||
|
@ -3476,6 +3479,9 @@ noexcept try
|
|||
if(unlikely(!ec && !sd.is_open()))
|
||||
ec = make_error_code(errc::bad_file_descriptor);
|
||||
|
||||
if(unlikely(!ec && fini))
|
||||
ec = make_error_code(errc::not_connected);
|
||||
|
||||
#ifdef IRCD_DEBUG_NET_SOCKET_READY
|
||||
const auto has_pending
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue