From 5c6b42de01c6d0b430284eb02f7220769e0730bf Mon Sep 17 00:00:00 2001 From: Mark Liebrand Date: Mon, 21 Nov 2016 08:48:37 +0100 Subject: [PATCH] Fix for the fix - last fix wasn't working entirely correct. --- UdpPipe/eu/liebrand/udppipe/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UdpPipe/eu/liebrand/udppipe/__init__.py b/UdpPipe/eu/liebrand/udppipe/__init__.py index a6065ab..d03a2f1 100644 --- a/UdpPipe/eu/liebrand/udppipe/__init__.py +++ b/UdpPipe/eu/liebrand/udppipe/__init__.py @@ -539,7 +539,8 @@ class Tail(PipeBase): elif e.errno==errno.ECONNREFUSED or e.errno==errno.EBADF or e.errno==errno.ECONNRESET: self.log.warn("[Tail] Unable to connect to host %s:%d. Will try again in %d seconds.(Reason %s)" % (self.headHost,self.headPort, Tail.WAIT4RETRY, str(e))) servSocket.close() - self.fds.remove(servSocket) + if servSocket in self.fds: + self.fds.remove(servSocket) self.connected=False time.sleep(Tail.WAIT4RETRY) servSocket=socket.socket(socket.AF_INET, socket.SOCK_STREAM)