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

socket: don't queue events on destroyed sockets. #11

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

nodech
Copy link
Member

@nodech nodech commented Oct 30, 2023

Sockets queue in the job queue when we want to wait for the response. This applies both to the closed socket (not destryoed) - which may reconnect and open connection. For both of these there's an interval running to check for timeouts for these jobs.

Situation is different when the socket destroyed. Destroyed socket may never reconnect nor should be reused. Timeout loop is also closed, so it should never queue the events but instead throw errors.

@nodech nodech merged commit 57a5fe0 into bcoin-org:master Oct 31, 2023
4 checks passed
nodech added a commit to nodech/hsd that referenced this pull request Oct 31, 2023
If the client closes before the socket.call, next call would never resolve nor reject and locker would never unlock.
@nodech nodech deleted the noqueue-on-destroy branch November 28, 2023 13:11
nodech added a commit to nodech/hsd that referenced this pull request Dec 13, 2023
If the client closes before the socket.call, next call would never resolve nor reject and locker would never unlock.
nodech added a commit to nodech/hsd that referenced this pull request Dec 13, 2023
If the client closes before the socket.call, next call would never resolve nor reject and locker would never unlock.
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.

1 participant