mirror of
https://github.com/varun-r-mallya/py-libp2p.git
synced 2025-12-31 20:36:24 +00:00
Make notifee functions all async
This commit is contained in:
@ -76,7 +76,7 @@ class Swarm(INetwork):
|
||||
|
||||
# Call notifiers since event occurred
|
||||
for notifee in self.notifees:
|
||||
notifee.connected(self, muxed_conn)
|
||||
await notifee.connected(self, muxed_conn)
|
||||
|
||||
return muxed_conn
|
||||
|
||||
@ -110,7 +110,7 @@ class Swarm(INetwork):
|
||||
|
||||
# Call notifiers since event occurred
|
||||
for notifee in self.notifees:
|
||||
notifee.opened_stream(self, net_stream)
|
||||
await notifee.opened_stream(self, net_stream)
|
||||
|
||||
return net_stream
|
||||
|
||||
@ -151,7 +151,7 @@ class Swarm(INetwork):
|
||||
|
||||
# Call notifiers since event occurred
|
||||
for notifee in self.notifees:
|
||||
notifee.connected(self, muxed_conn)
|
||||
await notifee.connected(self, muxed_conn)
|
||||
|
||||
try:
|
||||
# Success
|
||||
@ -161,7 +161,7 @@ class Swarm(INetwork):
|
||||
|
||||
# Call notifiers since event occurred
|
||||
for notifee in self.notifees:
|
||||
notifee.listen(self, multiaddr)
|
||||
await notifee.listen(self, multiaddr)
|
||||
|
||||
return True
|
||||
except IOError:
|
||||
|
||||
Reference in New Issue
Block a user