resetError method

Future<void> resetError()

Resets the Agent so it can start receiving messages again.

Implementation

Future<void> resetError() async {
  if (_isolate == null) {
    throw StateError('Agent has been killed.');
  }
  ReceivePort receivePort = ReceivePort();
  _sendPort
      .send(_Command(_Commands.resetError, sendPort: receivePort.sendPort));
  await receivePort.first;
}