From dc19198e25d53a7b9d22160adcf5a048314f411e Mon Sep 17 00:00:00 2001 From: Rossen Georgiev Date: Sun, 17 Jan 2016 20:33:17 +0000 Subject: [PATCH] CMCLient: emit reconnect when about to reconnect --- steam/core/cm.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/steam/core/cm.py b/steam/core/cm.py index 02e68d5..3dd22b3 100644 --- a/steam/core/cm.py +++ b/steam/core/cm.py @@ -85,10 +85,12 @@ class CMClient(EventEmitter): self._recv_loop.kill() self._init_attributes() - self.emit('disconnected') if reconnect: + self.emit('reconnect') gevent.spawn(self.connect) + else: + self.emit('disconnected') def _init_attributes(self): self.current_server_addr = None