onConnectionError method

  1. @override
void onConnectionError(
  1. dynamic error
)

Is called when the connection encountered an error

Implementation

@override
void onConnectionError(dynamic error) {
  // a command awaiting its response would otherwise hang forever:
  _failCurrentCommand('connection lost: $error');
  if (!_eventController.isClosed) {
    _eventController.add(SmtpConnectionLostEvent(this));
  }
}