Skip to content
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

Merged
merged 5 commits into from
Jun 12, 2024

Conversation

kwvg
Copy link
Collaborator

@kwvg kwvg commented Jun 11, 2024

Additional Information

Breaking Changes

None expected.

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas (note: N/A)
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation (note: N/A)
  • I have assigned this pull request to a milestone (for repository code-owners and collaborators only)

@kwvg kwvg added this to the 21 milestone Jun 11, 2024
Copy link
Member

@PastaPastaPasta PastaPastaPasta left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK c24804c

@kwvg kwvg marked this pull request as ready for review June 11, 2024 19:01
@kwvg kwvg requested review from knst and UdjinM6 June 11, 2024 19:02
Copy link

@UdjinM6 UdjinM6 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

light ACK

@PastaPastaPasta PastaPastaPasta merged commit e4b22a6 into dashpay:develop Jun 12, 2024
8 checks passed
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) {
Copy link
Collaborator

@knst knst Sep 9, 2024

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

Copy link
Collaborator Author

@kwvg kwvg Sep 10, 2024

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.

dash/src/net.cpp

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");
}
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants