diff options
author | benlazzero <85390423+benlazzero@users.noreply.github.com> | 2022-10-06 11:30:16 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-06 18:30:16 +0000 |
commit | 6ff442c6b11b56d98583056c4832d48f284246dc (patch) | |
tree | 7ef646329bc7e56c8c286495db9241bced63ca89 | |
parent | 37429a3efa1238cb5b6e5c056dd4e9190575d5ca (diff) | |
download | websocket-client-6ff442c6b11b56d98583056c4832d48f284246dc.tar.gz |
Possible* Redundancy In Key Generation (#864)
Was digging through the code base the past few days as it's been an excellent aid in learning about Websockets and TCP. Noticed _create_sec_websocket_key was getting called twice per ws.connect method. I may be missing something, but thought I would bring it to your attention in case it's an artifact or something. Best Regards!
-rw-r--r-- | websocket/_handshake.py | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/websocket/_handshake.py b/websocket/_handshake.py index 6a57c95..07a4cfb 100644 --- a/websocket/_handshake.py +++ b/websocket/_handshake.py @@ -101,7 +101,6 @@ def _get_handshake_headers(resource, url, host, port, options): # Append Sec-WebSocket-Key & Sec-WebSocket-Version if not manually specified if not options.get('header') or 'Sec-WebSocket-Key' not in options['header']: - key = _create_sec_websocket_key() headers.append("Sec-WebSocket-Key: %s" % key) else: key = options['header']['Sec-WebSocket-Key'] |