refactor
This commit is contained in:
@@ -45,10 +45,6 @@ auto is_socket_still_alive(boost::asio::ip::tcp::socket &sock) -> bool {
|
||||
non_blocking_guard guard{sock};
|
||||
|
||||
boost::system::error_code err{};
|
||||
std::array<std::uint8_t, 1> tmp{};
|
||||
auto available = sock.receive(boost::asio::buffer(tmp),
|
||||
boost::asio::socket_base::message_peek, err);
|
||||
|
||||
if (err == boost::asio::error::would_block ||
|
||||
err == boost::asio::error::try_again) {
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user