diff options
Diffstat (limited to 'voctocore')
-rw-r--r-- | voctocore/lib/avpreviewoutput.py | 4 | ||||
-rw-r--r-- | voctocore/lib/avrawoutput.py | 2 | ||||
-rw-r--r-- | voctocore/lib/tcpmulticonnection.py | 6 |
3 files changed, 4 insertions, 8 deletions
diff --git a/voctocore/lib/avpreviewoutput.py b/voctocore/lib/avpreviewoutput.py index dbafea8..e444a87 100644 --- a/voctocore/lib/avpreviewoutput.py +++ b/voctocore/lib/avpreviewoutput.py @@ -51,7 +51,7 @@ class AVPreviewOutput(TCPMultiConnection): self.receiverPipeline = Gst.parse_launch(pipeline) self.receiverPipeline.set_state(Gst.State.PLAYING) - def on_accepted(self, conn, addr): + def on_accepted(self, conn): self.log.debug('Adding fd %u to multifdsink', conn.fileno()) fdsink = self.receiverPipeline.get_by_name('fd') fdsink.emit('add', conn.fileno()) @@ -59,6 +59,6 @@ class AVPreviewOutput(TCPMultiConnection): def on_disconnect(multifdsink, fileno): if fileno == conn.fileno(): self.log.debug('fd %u removed from multifdsink', fileno) - self.close_connection(conn, addr) + self.close_connection(conn) fdsink.connect('client-fd-removed', on_disconnect) diff --git a/voctocore/lib/avrawoutput.py b/voctocore/lib/avrawoutput.py index bda6b77..ea13ad4 100644 --- a/voctocore/lib/avrawoutput.py +++ b/voctocore/lib/avrawoutput.py @@ -48,6 +48,6 @@ class AVRawOutput(TCPMultiConnection): def on_disconnect(multifdsink, fileno): if fileno == conn.fileno(): self.log.debug('fd %u removed from multifdsink', fileno) - self.close_connection(conn, addr) + self.close_connection(conn) fdsink.connect('client-fd-removed', on_disconnect) diff --git a/voctocore/lib/tcpmulticonnection.py b/voctocore/lib/tcpmulticonnection.py index 5ad4ca2..fd2a633 100644 --- a/voctocore/lib/tcpmulticonnection.py +++ b/voctocore/lib/tcpmulticonnection.py @@ -36,10 +36,6 @@ class TCPMultiConnection(object): return True - def close_connection(self, conn, addr=None): - if addr is None: - addr = conn.getpeername() - + def close_connection(self, conn): self.currentConnections.remove(conn) - self.log.info('Disconnected Receiver %s', addr) self.log.info('Now %u Receiver connected', len(self.currentConnections)) |