File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -273,16 +273,14 @@ async def make_discoverable(peer=None):
273273 # to the signaling server is alive
274274 if peer .open :
275275 await join_peer_room (peer = peer )
276+ elif peer .destroyed :
277+ log .info ('Peer connection destroyed. Will create a new peer.' )
278+ peer = await pnp_service_connect ()
279+ elif peer .disconnected :
280+ log .info ('Peer disconnected. Will try to reconnect.' )
281+ await peer .reconnect ()
276282 else :
277- log .info ('Peer connected is not open.' )
278- elif peer .destroyed :
279- log .info ('Peer connection destroyed. Will create a new peer.' )
280- peer = await pnp_service_connect ()
281- elif peer .disconnected :
282- log .info ('Peer disconnected. Will try to reconnect.' )
283- await peer .reconnect ()
284- else :
285- log .info ('Peer still establishing connection. %r' , peer )
283+ log .info ('Peer still establishing connection. %r' , peer )
286284 except Exception as e :
287285 log .exception ('Unable to join room. '
288286 'Will retry in a few moments. '
You can’t perform that action at this time.
0 commit comments