Skip to content
Snippets Groups Projects
Commit c6e9ebde authored by Vijver, van de, Bob (UT-GUEST)'s avatar Vijver, van de, Bob (UT-GUEST)
Browse files

Use xmit in ping timeout window to determine broken connection correctly

parent 93f58858
No related branches found
No related tags found
No related merge requests found
...@@ -555,11 +555,12 @@ class Connection: ...@@ -555,11 +555,12 @@ class Connection:
now = time.time() now = time.time()
xmit_timeout = now > self.last_xmit + XMIT_TTL xmit_timeout = now > self.last_xmit + XMIT_TTL
ping_timeout = now > self.last_ping + PING_TTL ping_timeout = now > self.last_ping + PING_TTL
xmit_in_ping_timeout = self.last_xmit + PING_TTL > self.last_ping
if self.status == "disconnected": if self.status == "disconnected":
# If the queue is empty, we can drop this connection. # If the queue is empty, we can drop this connection.
self.status = "expired" self.status = "expired"
break break
elif ping_timeout: elif not xmit_in_ping_timeout and ping_timeout:
LOG.info(( LOG.info((
"timing out connection to %s at %s " "timing out connection to %s at %s "
"(ping_timeout=%s, xmit_timeout=%s)") % ( "(ping_timeout=%s, xmit_timeout=%s)") % (
......
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