Skip to content
Snippets Groups Projects
Commit 4a066599 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

try to connect to next type when connection is refused (server not listening on 5223)

parent 7ca670a3
No related branches found
No related tags found
No related merge requests found
......@@ -472,7 +472,12 @@ class NonBlockingTcp(PlugIn, IdleObject):
return
if received is None:
if errnum != 0:
if self.state == 0 and errnum == errno.ECONNREFUSED:
# We tried to connect to a port that did't listen.
log.error("Connection to %s refused: %s [%d]", self.getName(), errtxt, errnum)
self.pollend(retry=True)
return
elif errnum != 0:
self.DEBUG(errtxt, 'error')
log.error("Connection to %s lost: %s [%d]", self.getName(), errtxt, errnum)
self._owner.disconnected()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment