danpaquin / coinbasepro-python

The unofficial Python client for the Coinbase Pro API
MIT License
1.82k stars 732 forks source link

reinitializing start_t = 0 for ever in websocket_client _listen #264

Closed mcmeyer89 closed 6 years ago

mcmeyer89 commented 6 years ago

Hey I'm new her, hope my procedure of reporting is right i think start_t = 0 in line 86 should be mooved outside the while loop

mcardillo55 commented 6 years ago

I think you're right. Can you submit a PR?

royitaqi commented 6 years ago

I think this line is a bug but not the root cause. #256 actually had a good solution, where this line will be removed. Basically the problem is that the ws.ping call will be blocked by websocket recv method and not called, even if you guys fix this start_t = 0 line. There is a solution in #256 where the ping is moved to a separate thread so that it will not be blocked by recv. Although I think it might need some last-mile work to make it gracefully shutdown in the case of close() method is called (i.e. user intend to shutdown the client).

mcardillo55 commented 6 years ago

@royitaqi @deanblacc touches on a few of these issues you're talking about in #271