Skip to content

Commit

Permalink
Only use SSL socket if at least one SSL kwarg is not None (Fixes #1639)
Browse files Browse the repository at this point in the history
  • Loading branch information
JMANN240 authored and miguelgrinberg committed Jul 17, 2021
1 parent ee2c4e9 commit d6bd555
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/flask_socketio/__init__.py
Expand Up @@ -612,7 +612,8 @@ def run_server():
'ssl_version', 'ca_certs',
'do_handshake_on_connect', 'suppress_ragged_eofs',
'ciphers']
ssl_params = {k: kwargs[k] for k in kwargs if k in ssl_args}
ssl_params = {k: kwargs[k] for k in kwargs
if ssl_args.get(k) is not None}
if len(ssl_params) > 0:
for k in ssl_params:
kwargs.pop(k)
Expand Down

0 comments on commit d6bd555

Please sign in to comment.