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

The unregister in remove is being passed the wrong value. #53

Open
cnobile2012 opened this issue May 2, 2014 · 0 comments
Open

The unregister in remove is being passed the wrong value. #53

cnobile2012 opened this issue May 2, 2014 · 0 comments

Comments

@cnobile2012
Copy link

I've copied the method in the issue so it is obvious what I found. The call to the epoll().unregister() is being passed the source not the file descriptor or in your case the fileno integer value. This is most likely not blowing up because the source is actually a long int (memory address) itself, but nothing is getting unregistered either. The Python docs indicate that both register and unregister should take as their 1st argument fd (file descriptor).

    def remove(self, source):
        """Removes an event source from the Selector.

        Arguments:
        source -- the event source to remove.
        """
        fileno = source.fileno()
        self._get_epoll().unregister(source)
        del self._sources[fileno]
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

No branches or pull requests

1 participant