@ -22,9 +22,6 @@ class MeshCoreTcpManager {
}
Future<void> disconnect() async {
if (!_service.isConnected && _service.activeEndpoint == null) {
return;
_debugLog?.info('TcpManager.disconnect', tag: 'TCP');
await _service.disconnect();
@ -175,6 +175,11 @@ class TcpTransportService {
void _handleSocketDone() {
if (_status == TcpTransportStatus.disconnecting ||
_status == TcpTransportStatus.disconnected) {
_addFrameError(StateError('TCP socket closed by remote endpoint'));
unawaited(disconnect());
Powered by TurnKey Linux.