From 14b8df4f9cc455efeb7533980507e01b30fef00e Mon Sep 17 00:00:00 2001 From: croneter Date: Fri, 15 Sep 2017 20:01:20 +0200 Subject: [PATCH] Fix Alexa websocket not exiting on Handshake Status 403 --- resources/lib/websocket_client.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/resources/lib/websocket_client.py b/resources/lib/websocket_client.py index ba3f97e1..5a4466d9 100644 --- a/resources/lib/websocket_client.py +++ b/resources/lib/websocket_client.py @@ -111,7 +111,8 @@ class WebSocket(Thread): except websocket.WebSocketException as e: log.info('%s: WebSocketException: %s' % (self.__class__.__name__, e)) - if 'Handshake Status 401' in e.args: + if ('Handshake Status 401' in e.args + or 'Handshake Status 403' in e.args): handshake_counter += 1 if handshake_counter >= 5: log.info('%s: Error in handshake detected. '