Skip to content

Commit

Permalink
Merge pull request #1 from jupyterhub/yes-no
Browse files Browse the repository at this point in the history
Explicitly check for 'no' and 'false' in USE_SOCKET env var
  • Loading branch information
jhgoebbert authored Jan 2, 2025
2 parents 8745ed0 + 388c0e4 commit 20f6f78
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions jupyter_rsession_proxy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,15 @@ def _get_timeout(default=15):
'icon_path': get_icon_path()
}
}
if os.getenv('JUPYTER_RSESSION_PROXY_USE_SOCKET'):
server_process['unix_socket'] = True

use_socket = os.getenv('JUPYTER_RSESSION_PROXY_USE_SOCKET')
if use_socket is not None:
# If this env var is anything other than case insensitive 'no' or 'false',
# use unix sockets instead of tcp sockets. This allows us to default to
# using unix sockets by default in the future once this feature is better
# tested, and allow people to turn it off if needed.
if use_socket.casefold() not in ('no', 'false'):
server_process['unix_socket'] = True

return server_process

Expand Down

0 comments on commit 20f6f78

Please sign in to comment.