Hello,
There are multiple posts out there on monitoring connection status, and "raising" if 502/504. But that is not satisfactory to my taste, the question is?how to cleanly reconnect when encountering errors 502/504? The way I understand it, the below code similar to the linked thread, works. The issue I see with it is that I need to re instantiate the entire API class. Isn't there a cleaner more specific way to do this? rather than overriding the entire core thread? For reference the class Core(EWrapper, EClient) is the API class in this case. Thanks def main(): |