mirror of
https://github.com/matrix-construct/construct
synced 2024-11-25 08:12:37 +01:00
ircd::net: Check if socket fd is open first before other checks.
This commit is contained in:
parent
4ac5d52b45
commit
25d35181be
1 changed files with 3 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue