Skip to content

Commit

Permalink
Make EndpointListeners use CallFromThread by default
Browse files Browse the repository at this point in the history
  • Loading branch information
ichorid committed May 8, 2018
1 parent 9881b3d commit 74acb5c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion ipv8/messaging/interfaces/endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ class EndpointListener(object):

__metaclass__ = abc.ABCMeta

def __init__(self, endpoint, main_thread=False):
def __init__(self, endpoint, main_thread=True):
"""
Create a new listener.
Expand Down
2 changes: 1 addition & 1 deletion ipv8/overlay.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def __init__(self, master_peer, my_peer, endpoint, network):
:param endpoint: the endpoint to use for messaging
:param network: the network graph backend
"""
EndpointListener.__init__(self, endpoint, False)
EndpointListener.__init__(self, endpoint)
TaskManager.__init__(self)
self.serializer = self.get_serializer()
self.crypto = ECCrypto()
Expand Down
2 changes: 1 addition & 1 deletion ipv8/test/mocking/exit_socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def __init__(self, parent):

TunnelExitSocket.__init__(self, parent.circuit_id, parent.overlay, parent.sock_addr, parent.mid)
parent.close()
EndpointListener.__init__(self, self.endpoint)
EndpointListener.__init__(self, self.endpoint, main_thread = False)

self.endpoint.add_listener(self)

Expand Down

0 comments on commit 74acb5c

Please sign in to comment.