diff options
-rw-r--r-- | voctocore/lib/tcpsingleconnection.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/voctocore/lib/tcpsingleconnection.py b/voctocore/lib/tcpsingleconnection.py index 4ff94d2..886318f 100644 --- a/voctocore/lib/tcpsingleconnection.py +++ b/voctocore/lib/tcpsingleconnection.py @@ -1,5 +1,5 @@ #!/usr/bin/python3 -import logging, socket +import logging, socket, time from gi.repository import GObject from lib.config import Config @@ -28,8 +28,9 @@ class TCPSingleConnection(object): self.log.info("Incomming Connection from %s", addr) if self.currentConnection is not None: - self.log.warn("Another Source is already connected") - return True + self.log.warn("Another Source is already connected, closing existing pipeline") + self.disconnect() + time.sleep(1) self.on_accepted(conn, addr) self.currentConnection = conn |