Fix Alexa websocket not exiting on Handshake Status 403

This commit is contained in:
croneter 2017-09-15 20:01:20 +02:00
parent 0dc27dd98c
commit 14b8df4f9c
1 changed files with 2 additions and 1 deletions

View File

@ -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. '