0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-10-01 05:08:59 +02:00

ircd::net: Check if socket fd is open first before other checks.

This commit is contained in:
Jason Volk 2019-07-27 14:42:42 -07:00
parent 4ac5d52b45
commit 25d35181be

View file

@ -3168,6 +3168,9 @@ noexcept
})
};
if(unlikely(!sd.is_open()))
return make_error_code(std::errc::bad_file_descriptor);
std::error_code ret;
if(SSL_peek(ssl.native_handle(), buf, sizeof(buf)) >= ssize_t(sizeof(buf)))
return ret;