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

Only unregister the listener when eph is true #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

evomassiny
Copy link

Thank you for this repo, it helped me a lot to grasp the basics of asynchronous servers under linux !

Nevertheless -on my config- after any request, the current version of this repo will panic at the end of the connection, when dropping the AsyncTcpStream, with this error:
epoll:ctl_del_rawfd:error: No such file or directory

My guess is, when a tcp stream is dropped, it's already been automatically unregistered from its Epoll file descriptor set, because of the use of the flag EPOLLONESHOT

A quick way to solve this is to check if the stream still belong to an Epoll file descriptor set, by looking at stream.eph flag.

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