clientNetworkError method

  1. @internal
void clientNetworkError([
  1. dynamic error
])

Called when the client's connection is closed with an error state

Implementation

@internal
void clientNetworkError([dynamic error]) {
  if (protocolState == KuzzleProtocolState.offline) {
    return;
  }

  protocolState = KuzzleProtocolState.offline;

  emit(ProtocolEvents.NETWORK_ERROR, [error]);

  unawaited(_handleAutoReconnect());
}