Skip to content

Commit ff5d07f

Browse files
committed
Fix another socket descriptor comparison that doesn't work correctly if
the descriptor type is unsigned.
1 parent ca4c666 commit ff5d07f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

asio/include/asio/detail/reactive_socket_accept_op.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class reactive_socket_accept_op_base : public reactor_op
5757
o->peer_endpoint_ ? &addrlen : 0, o->ec_, new_socket);
5858

5959
// On success, assign new connection to peer socket object.
60-
if (new_socket >= 0)
60+
if (new_socket != invalid_socket)
6161
{
6262
socket_holder new_socket_holder(new_socket);
6363
if (o->peer_endpoint_)

0 commit comments

Comments
 (0)