Explorar el Código

Add connectionreset to excepion catch

JoostSijm hace 6 años
padre
commit
487775c08d
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      rival_regions_wrapper/client.py

+ 1 - 1
rival_regions_wrapper/client.py

@@ -37,7 +37,7 @@ def session_handler(func):
         instance = args[0]
         try:
             return func(*args, **kwargs)
-        except (SessionExpireException, ConnectionError):
+        except (SessionExpireException, ConnectionError, ConnectionResetError):
             instance.remove_cookie(instance.username)
             instance.login()
             return func(*args, **kwargs)