This repository was archived by the owner on Oct 13, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ def _start_main_thread(self):
217217 The websocket clients starts a separate thread upon
218218 initialization with further subthreads for each connection.
219219 """
220+ self .on_open ()
220221 thread = Thread (target = self ._start_socket_control_queue )
221222 thread .daemon = True
222223 self .threads [thread .getName ()] = thread
@@ -538,7 +539,6 @@ def _handle_reconnect(self, reconnect_event):
538539 def _is_first_run (self , tickers , sub_type ):
539540 # Check if the websocket has been initiated already or if it's the first run.
540541 if not self .tickers .list :
541- self .on_open ()
542542 self ._subscribe_first_run (tickers , sub_type )
543543 else :
544544 return False
@@ -559,7 +559,6 @@ def _handle_is_first_run(self, is_first_run_event):
559559 tickers , sub_type = is_first_run_event .tickers , is_first_run_event .sub_type
560560 sub_states = self .tickers .sort_by_sub_state ()
561561 if not sub_states :
562- self .on_open ()
563562 self ._subscribe_first_run (tickers , sub_type )
564563 elif len (sub_states ) == 1 and False in sub_states :
565564 self ._subscribe_first_run (tickers , sub_type )
You can’t perform that action at this time.
0 commit comments