diff options
author | Damjan Stulic <damjan.stulic@sonos.com> | 2019-08-07 16:09:28 -0700 |
---|---|---|
committer | Damjan Stulic <damjan.stulic@sonos.com> | 2019-08-07 16:09:28 -0700 |
commit | 58c05a9283b128372d31715a2d9a1046f9806af7 (patch) | |
tree | 250b5a08c0509e2b1cd994ed0db5c095da293a65 /websocket | |
parent | 72a06826ad5814e000b8cf4f09d5b745471e0326 (diff) | |
download | websocket-client-58c05a9283b128372d31715a2d9a1046f9806af7.tar.gz |
updated if statement to include check against None
Diffstat (limited to 'websocket')
-rw-r--r-- | websocket/_handshake.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/websocket/_handshake.py b/websocket/_handshake.py index 92b3f9b..3ff5147 100644 --- a/websocket/_handshake.py +++ b/websocket/_handshake.py @@ -124,7 +124,7 @@ def _get_handshake_headers(resource, host, port, options): if not 'header' in options or 'Sec-WebSocket-Version' not in options['header']: headers.append("Sec-WebSocket-Version: %s" % VERSION) - if not 'connection' in options: + if not 'connection' in options or options['connection'] is None: headers.append('Connection: upgrade') else: headers.append(options['connection']) |