injectDone method
void
injectDone()
Simulates a clean peer FIN: the socket reports an error rather than
just closing the stream, matching MqttSocketTransport.
Implementation
void injectDone() {
if (_closed) {
return;
}
_connected = false;
_incoming.addError(
MqttTransportException('Connection closed by peer'),
StackTrace.current,
);
}