Browse Source

fix logoff() hanging in certain cases

pull/129/head
Rossen Georgiev 8 years ago
parent
commit
9b27ca2e34
  1. 5
      steam/client/__init__.py

5
steam/client/__init__.py

@ -554,7 +554,10 @@ class SteamClient(CMClient, BuiltinBase):
if self.logged_on: if self.logged_on:
self.logged_on = False self.logged_on = False
self.send(MsgProto(EMsg.ClientLogOff)) self.send(MsgProto(EMsg.ClientLogOff))
self.wait_event('disconnected') try:
self.wait_event(self.EVENT_DISCONNECTED, timeout=5, raises=True)
except:
self.disconnect()
self.idle() self.idle()
def run_forever(self): def run_forever(self):

Loading…
Cancel
Save