Closed Hattorius closed 3 years ago
For some dark and unknown reasons it actually starts when you open 50 connections:
for i in range(50):
print(i+1)
tick = ticker()
tick.start()
It doesn't work if you don't include the print(i+1)
Since https://github.com/Hattorius/Tradingview-ticker/commit/be09b070aec8e7b5f8bf1d746849fe014211fffb it'll need 51 connections instead of 50?
for i in range(51):
print(i+1)
tick = ticker()
tick.start()
This is spooky man :(
👻 Computers are spooky
appears to be an issue with closing the threads before they're fully started, this is only a problem when 1 instance is created.
To fix this issue add a sleep function to the end of the file.
time.sleep(1)
This will make sure all threads are fully running before closing the main thread.
Expected Behavior
The program should send authorization messages after which it'll receive updates on the tickers
Current Behavior
Freezes on
websockets.connect()
, continues the program but freezes eventually when the program tries to send a message https://github.com/Hattorius/Tradingview-ticker/blob/ed2131e958f86baf2aa655f25264fee91d9241d9/start.py#L14-L20Steps to Reproduce
The following code should give you the same issue: