Fix compilation

This commit is contained in:
momo5502
2025-01-12 08:43:34 +01:00
parent 8333c25f2c
commit dd226bd45a
3 changed files with 13 additions and 3 deletions

View File

@@ -13,7 +13,13 @@ namespace network
address a{};
auto len = a.get_max_size();
return ::accept(this->get_socket(), &a.get_addr(), &len);
const auto s = ::accept(this->get_socket(), &a.get_addr(), &len);
if (s == INVALID_SOCKET)
{
return {};
}
return {s, a};
}
void tcp_server_socket::listen()