restart method

void restart()

Implementation

void restart() async {
  if (_websocketIntendedState != WebsocketStatus.running) {
    return;
  }
  if (_wsRpc2Client != null && _wsRpc2Client!.isClosed == true) {
    logger.info('Restarting websocket connection ...');
    await initialize(url!, retry: true);
    logger.info('Websocket connection successfully restarted');
  }
}