-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
backport: merge bitcoin#21879, #23604, #24357, #25426, #24378 (sockets backports) #6054
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
utACK c24804c
…tsockname() and use it in GetBindAddress()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
light ACK
src/net.cpp
Outdated
@@ -3582,12 +3579,10 @@ void CConnman::StopNodes() | |||
pnode->CloseSocketDisconnect(this); | |||
} | |||
for (ListenSocket& hListenSocket : vhListenSocket) { | |||
if (hListenSocket.socket != INVALID_SOCKET) { | |||
if (m_edge_trig_events && !m_edge_trig_events->RemoveSocket(hListenSocket.socket)) { | |||
if (hListenSocket.sock->Get() != INVALID_SOCKET) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why these lines are not removed? I am going to prepare PR with fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because we iterate through them to remove them from the ETE list, the kernel needs to be notified before the socket gets destroyed.
Lines 3763 to 3769 in 0c243ab
for (ListenSocket& hListenSocket : vhListenSocket) { | |
if (hListenSocket.sock) { | |
if (m_edge_trig_events && !m_edge_trig_events->RemoveSocket(hListenSocket.sock->Get())) { | |
LogPrintf("EdgeTriggeredEvents::RemoveSocket() failed\n"); | |
} | |
} | |
} |
Additional Information
-socketevents
toSock
, implementSock::WaitMany
{Epoll
,KQueue
} #6018Breaking Changes
None expected.
Checklist: