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

Add libtorrent 1.1.13 support for listen_succeeded_alert #5487

Merged
merged 1 commit into from
Jul 17, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,10 @@ def process_alert(self, alert, hops=0):
self._logger.debug("Got alert for unknown download %s: %s", hexlify(infohash), alert)

if alert_type == 'listen_succeeded_alert':
self.listen_ports[hops] = alert.port
# The ``port`` attribute was added in libtorrent 1.1.14.
# Older versions (most notably libtorrent 1.1.13 - the default on Ubuntu 20.04) do not have this attribute.
# We use the now-deprecated ``endpoint`` attribute for these older versions.
self.listen_ports[hops] = getattr(alert, "port", alert.endpoint[1])

elif alert_type == 'peer_disconnected_alert' and \
self.tribler_session and self.tribler_session.payout_manager:
Expand Down