From 6ed43fcd873e8877e93e88d1bfabde424695bef3 Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Sat, 16 Jan 2016 06:06:53 +0000 Subject: [PATCH] avoid infinite wait during channel encrpytion --- steam/core/cm.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/steam/core/cm.py b/steam/core/cm.py index 272f664..02e68d5 100644 --- a/steam/core/cm.py +++ b/steam/core/cm.py @@ -201,7 +201,11 @@ class CMClient(EventEmitter): self.send_message(resp) - msg = self.wait_event(EMsg.ChannelEncryptResult) + try: + msg = self.wait_event(EMsg.ChannelEncryptResult, timeout=15) + except gevent.Timeout: + gevent.spawn(self.disconnect, True) + return if msg.body.eresult != EResult.OK: logger.debug("Failed to secure channel: %s" % msg.body.eresult)