File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,9 @@ def __init__(
2626 log .info (f"Opening websocket connection for Client { self .id } " )
2727 websocket .enableTrace (True )
2828
29+ # Parse server URL and get proxy path used, if any
2930 url = urllib .parse .urlparse (server )._replace (scheme = "ws" )
30- proxy_path = url .path .rstrip (
31- "/"
32- ) # Path component indicates what the proxy path used was
31+ proxy_path = url .path .rstrip ("/" )
3332
3433 self ._address = url .geturl ()
3534 self ._alive = True
@@ -39,7 +38,7 @@ def __init__(
3938
4039 # Construct the websocket URL
4140 # Prepend the proxy path to the new URL path
42- # It will evaluate to "" if nothing's there, and starts with "/path " if present
41+ # It will evaluate to "" if nothing's there, and starts with "/" if present
4342 ws_url = (
4443 url ._replace (path = f"{ proxy_path } /ws/test/{ self .id } " ).geturl ()
4544 if register_client
You can’t perform that action at this time.
0 commit comments