-
Notifications
You must be signed in to change notification settings - Fork 47
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
Reimplement UDP endpoint listener with Twisted DatagramProtocol #126
Conversation
Can one of the admins verify this patch? |
Ok to test |
Can one of the admins verify this patch? |
Ok to test |
Can one of the admins verify this patch? |
Ok to test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Next to these two comments, could you also take care of the Pylint errors?
This avoids new technical debt being added to our beautiful IPv8 codebase.
for _ in xrange(10000): | ||
try: | ||
self._listening_port = reactor.listenUDP(self._port, self, self._ip, UDP_MAX_SIZE) | ||
#self._listening_port.startListening() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out code here?
self._running = False | ||
result = True | ||
#FIXME: this thing returns Deferred, need to account for that | ||
self._listening_port.stopListening() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not just return this deferred and get rid of the timeout parameter?
So I just removed the timeout argument completely. Anyways, it was not used anywhere. |
Greatly speed-ups everything!
See Tribler/tribler#2548