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

Reimplement UDP endpoint listener with Twisted DatagramProtocol #126

Merged
merged 4 commits into from
May 9, 2018

Conversation

ichorid
Copy link
Contributor

@ichorid ichorid commented May 7, 2018

Greatly speed-ups everything!
See Tribler/tribler#2548

@tribler-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@qstokkink
Copy link
Collaborator

Ok to test

@ichorid ichorid reopened this May 8, 2018
@tribler-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@qstokkink
Copy link
Collaborator

Ok to test

@ichorid ichorid reopened this May 8, 2018
@tribler-ci
Copy link
Collaborator

Can one of the admins verify this patch?

@qstokkink
Copy link
Collaborator

Ok to test

Copy link
Collaborator

@qstokkink qstokkink left a 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()
Copy link
Collaborator

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()
Copy link
Collaborator

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?

@ichorid
Copy link
Contributor Author

ichorid commented May 9, 2018

So I just removed the timeout argument completely. Anyways, it was not used anywhere.

@qstokkink qstokkink merged commit 56f0d1f into Tribler:master May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants