@@ -15,15 +15,15 @@ class WebSocketClient(object):
1515 # TODO: Either an instance of the client couples 1:1 with the cluster or an instance of the Client couples 1:3 with
1616 # the 3 possible clusters (I think I like client per, but then a problem is the user can make multiple clients for
1717 # the same cluster and that's not desirable behavior,
18- # somehow keeping track with multiple Client instances will be the issue )
18+ # somehow keeping track with multiple Client instances will be the difficulty )
1919 def __init__ (self , cluster : str , auth_key : str , process_message : Optional [Callable [[str ], None ]] = None ):
2020 self ._host = self .DEFAULT_HOST
2121 self .url = f"wss://{ self ._host } /{ cluster } "
22- self .auth_key = auth_key
23- self .ws : websocket .WebSocketApp = websocket .WebSocketApp (self .url , on_error = self ._default_on_error ,
22+ self .ws : websocket .WebSocketApp = websocket .WebSocketApp (self .url , on_open = self ._default_on_open (),
2423 on_close = self ._default_on_close ,
25- on_message = self ._default_on_message (),
26- on_open = self ._authenticate ())
24+ on_error = self ._default_on_error ,
25+ on_message = self ._default_on_message ())
26+ self .auth_key = auth_key
2727
2828 self .process_message = process_message
2929
0 commit comments