onWebsocketError method

  1. @protected
void onWebsocketError(
  1. Object error, [
  2. StackTrace? stackTrace
])

The websocket's error handler.

Forwards stream errors to the notification dispatchers.

Implementation

@protected
void onWebsocketError(final Object error, [final StackTrace? stackTrace]) {
  final List<WebsocketNotifier> notifiers =
      _notifiers.values.toList(growable: false);
  for (final WebsocketNotifier notifier in notifiers) {
    _onNotifyError(notifier, error, stackTrace);
  }
}