Commit b175c5a2 authored by hugosilvaguerreiro's avatar hugosilvaguerreiro Committed by oroulet

Fix session renewal bug.

The renewal loop  was sleeping for hundreds of hours
parent d294e0a5
......@@ -346,9 +346,9 @@ class Client:
but it does not cost much..
"""
try:
duration = min(self.session_timeout, self.secure_channel_timeout) * 0.7
duration = min(self.session_timeout, self.secure_channel_timeout) * 0.7 * 0.001
while True:
# 0.7 is from spec
# 0.7 is from spec. 0.001 is because asyncio.sleep expects time in seconds
await asyncio.sleep(duration)
self.logger.debug("renewing channel")
await self.open_secure_channel(renew=True)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment