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

src: sp: tcp: Finish receive aio on close #1636

Merged
merged 1 commit into from
Feb 5, 2023

Conversation

apokriff
Copy link
Contributor

Issue:
I use bus protocol on tcp. Programm some times hangs on closing socket.

This change fixes hangs on socket close. I saw hang with bus protocol on close from time to time. It hangs in bus0_pipe_stop() on nni_aio_stop(&p->aio_recv); As I found protocol's aio calls on stopping tcptran_pipe_recv_cancel() that should remove it from tcp->recvq, but tcp->rxaio is stopped at that time by tcp close function. As I understand tcptran_pipe_recv_cb() some times is called in between of setting up closed flag and real stopping of tcp->rxaio. This change should fix handling of this scenario

Finish receive aio on tcp
pipe close
src/sp/transport/tcp/tcp.c Show resolved Hide resolved
@gdamore gdamore merged commit a1bc737 into nanomsg:master Feb 5, 2023
@avostrik avostrik deleted the fix_close branch July 3, 2024 12:53
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.

2 participants