diff --git a/subprojects/gst-examples/webrtc/signalling/simple_server.py b/subprojects/gst-examples/webrtc/signalling/simple_server.py index cb42591aec..9eab742dfd 100755 --- a/subprojects/gst-examples/webrtc/signalling/simple_server.py +++ b/subprojects/gst-examples/webrtc/signalling/simple_server.py @@ -161,7 +161,13 @@ class WebRTCSimpleServer(object): if callee_id not in self.peers: await ws.send('ERROR peer {!r} not found'.format(callee_id)) continue - if self.peers[callee_id][2] is not None: + if peer_status is not None: + await ws.send('ERROR you are already in a session, reconnect ' + 'to the server to start a new session, or use' + 'a ROOM for multi-peer sessions') + continue + callee_status = self.peers[callee_id][2] + if callee_status is not None: await ws.send('ERROR peer {!r} busy'.format(callee_id)) continue await ws.send('SESSION_OK')