test(tcp): harden cancel-race handling and add coverage

- tighten late TCP connect error suppression to manual-cancel disconnecting/disconnected windows
- keep TCP handshake failures surfaced outside explicit cancel flow
- allow TcpScreen connect action when connector is scanning
- add connector-level tests for late-error suppression classifier
- add TcpScreen test covering connect from scanning state
This commit is contained in:
just-stuff-tm
2026-03-10 20:06:05 -04:00
parent 1913a5aa11
commit 9db79e9d40
4 changed files with 113 additions and 5 deletions
+5 -1
View File
@@ -224,7 +224,11 @@ class _TcpScreenState extends State<TcpScreen> {
}
Future<void> _connectTcp() async {
if (_connector.state != MeshCoreConnectionState.disconnected) return;
if (_connector.state == MeshCoreConnectionState.connecting ||
_connector.state == MeshCoreConnectionState.connected ||
_connector.state == MeshCoreConnectionState.disconnecting) {
return;
}
final host = _hostController.text.trim();
final parsedPort = int.tryParse(_portController.text.trim());