diff --git a/Tribler/community/anontunnel/community.py b/Tribler/community/anontunnel/community.py index 67491aa4113..1fb92c2fd64 100755 --- a/Tribler/community/anontunnel/community.py +++ b/Tribler/community/anontunnel/community.py @@ -315,10 +315,6 @@ def on_bypass_message(self, sock_addr, packet): relay_key = (candidate, circuit_id) packet_type = self.proxy_conversion.get_type(data) - # TODO: remove this line - if packet_type == chr(6): - return - logger.debug("GOT %s from %s:%d over circuit %d", MESSAGE_STRING_REPRESENTATION[packet_type], candidate.sock_addr[0], candidate.sock_addr[1], circuit_id) # First, relay packet if we know whom to forward message to for this circuit @@ -342,7 +338,7 @@ def on_bypass_message(self, sock_addr, packet): if circuit_id in self.circuits: self.circuits[circuit_id].last_incomming = time() - if not self.on_custom[packet_type](circuit_id, candidate, payload): + if not self.on_custom.get(packet_type, lambda *args:None)(circuit_id, candidate, payload): self.dict_inc(dispersy.statistics.success, MESSAGE_STRING_REPRESENTATION[packet_type] + '-ignored') logger.debug("Prev message was IGNORED") else: @@ -352,7 +348,7 @@ class CircuitRequestCache(NumberCache): @staticmethod def create_number(force_number= -1): - return force_number if force_number >= 0 else IntroductionRequestCache.create_number() + return force_number if force_number >= 0 else NumberCache.create_number() @staticmethod def create_identifier(number, force_number= -1): @@ -561,7 +557,7 @@ class PingRequestCache(NumberCache): @staticmethod def create_number(force_number= -1): - return force_number if force_number >= 0 else IntroductionRequestCache.create_number() + return force_number if force_number >= 0 else NumberCache.create_number() @staticmethod def create_identifier(number, force_number= -1): @@ -668,7 +664,7 @@ def check_ready(self): self.circuit_selection_strategy.try_select(self.active_circuits) self.online = True - except BaseException: + except ValueError: self.online = False finally: diff --git a/Tribler/dispersy b/Tribler/dispersy index 7f02bf34c7d..dc43c46a160 160000 --- a/Tribler/dispersy +++ b/Tribler/dispersy @@ -1 +1 @@ -Subproject commit 7f02bf34c7db9c5be6643f9746e2920346f9d847 +Subproject commit dc43c46a1601d7f9549d0bb0dbfd2bf6c6f8255a