diff options
author | MaZderMind <github@mazdermind.de> | 2015-05-22 12:29:10 +0200 |
---|---|---|
committer | MaZderMind <github@mazdermind.de> | 2015-05-22 12:29:10 +0200 |
commit | a1d1076b2243f6c1e9527afb0be359407fe2f4c4 (patch) | |
tree | 00e7ce8bd4d49cbf00555bf70b645fcee88bbdb9 /voctocore/lib | |
parent | 7032dd72208b9d44d41aff6d114dd01256940e7e (diff) |
Cannot relyably determin the closed connections' addresst. so don't try to.
Diffstat (limited to 'voctocore/lib')
-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)) |