如果websocket 因为某些原因断开之后怎么重连呢?
def on_close():

my_client = UMFuturesWebsocketClient(on_message=message_handler, on_close=on_close)


on_close is a parameter for you to place your callback to handle the close signal from the connection.
If there’s unexpected errors with the connection, you should look into on_error as well.

Looking at the source code, you can notice that UMFuturesWebsocketClient is inheriting from BinanceWebsocketClient, where self.socket_manager.start() is located.
This means that, for you to restarted the connection, you need to restart the UMFuturesWebsocketClient.