fixing close method that is called as part of __del__. No longer throws error trying to call an attribute that will not exist if object fails during instantiation

This commit is contained in:
Matt Porritt 2015-05-22 17:11:21 +10:00
commit 689648ba32

View file

@ -173,7 +173,10 @@ class EngineIO(LoggingMixin):
def _close(self):
self._wants_to_close = True
self._heartbeat_thread.halt()
try:
self._heartbeat_thread.halt()
except AttributeError:
pass
if not self._opened:
return
engineIO_packet_type = 1