0
0
Fork 0
mirror of https://github.com/bitcoin/bitcoin.git synced 2025-02-02 09:46:52 -05:00

Merge bitcoin/bitcoin#23601: Don't check if the listening socket is valid

6c9ee92ffe net: don't check if the listening socket is valid (Vasil Dimov)

Pull request description:

  _This is a piece of #21878, chopped off to ease review._

  Listening sockets in `CConnman::vhListenSocket` are always valid
  (underlying file descriptor is not `INVALID_SOCKET`).

ACKs for top commit:
  theStack:
    Code-review ACK 6c9ee92ffe 🔌

Tree-SHA512: b2e29711c6a0c7c85467ca61cfd7fb734eb06bd83a41f88735901caf90aec095ca80707ce5bb897d39c80fdec16819dbf5a84979c9b1ab3dc3fb8b08cebe7c61
This commit is contained in:
MarcoFalke 2021-12-01 09:34:21 +01:00
commit f2074eeb2d
No known key found for this signature in database
GPG key ID: CE2B75697E69A548

View file

@ -1640,7 +1640,7 @@ void CConnman::SocketHandlerListening(const std::set<SOCKET>& recv_set)
if (interruptNet) {
return;
}
if (listen_socket.socket != INVALID_SOCKET && recv_set.count(listen_socket.socket) > 0) {
if (recv_set.count(listen_socket.socket) > 0) {
AcceptConnection(listen_socket);
}
}