Skip to content

Commit 6c9ee92

Browse files
committed
net: don't check if the listening socket is valid
Listening sockets in `CConnman::vhListenSocket` are always valid (underlying file descriptor is not `INVALID_SOCKET`).
1 parent 2a492d4 commit 6c9ee92

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/net.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1640,7 +1640,7 @@ void CConnman::SocketHandlerListening(const std::set<SOCKET>& recv_set)
16401640
if (interruptNet) {
16411641
return;
16421642
}
1643-
if (listen_socket.socket != INVALID_SOCKET && recv_set.count(listen_socket.socket) > 0) {
1643+
if (recv_set.count(listen_socket.socket) > 0) {
16441644
AcceptConnection(listen_socket);
16451645
}
16461646
}

0 commit comments

Comments
 (0)