net/SocketError: move check to IsSocketError()
This commit is contained in:
parent
7b938b4d14
commit
432bfa15f4
|
@ -165,11 +165,18 @@ SocketErrorCategory() noexcept
|
|||
#endif
|
||||
}
|
||||
|
||||
[[gnu::pure]]
|
||||
static inline bool
|
||||
IsSocketError(const std::system_error &e) noexcept
|
||||
{
|
||||
return e.code().category() == SocketErrorCategory();
|
||||
}
|
||||
|
||||
[[gnu::pure]]
|
||||
static inline bool
|
||||
IsSocketErrorReceiveWouldBlock(const std::system_error &e) noexcept
|
||||
{
|
||||
return e.code().category() == SocketErrorCategory() &&
|
||||
return IsSocketError(e) &&
|
||||
IsSocketErrorReceiveWouldBlock(e.code().value());
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue