Fix for the fix - last fix wasn't working entirely correct.

This commit is contained in:
Mark Liebrand 2016-11-21 08:48:37 +01:00
parent 06d595dbce
commit 5c6b42de01
1 changed files with 2 additions and 1 deletions

View File

@ -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)