fix(tcp): guard connect cancellation race and align USB screen actions

- add connectTcp cancellation guards after socket connect and connect delay so handshake does not proceed when transport/state changed
- ignore late TCP connect errors after manual cancel or transport switch to avoid spurious second disconnect paths
- keep TCP action hidden only on web and show Bluetooth action on USB screen across platforms for navigation consistency
This commit is contained in:
just-stuff-tm
2026-03-10 19:27:39 -04:00
parent 929c1c3d28
commit 1913a5aa11
2 changed files with 39 additions and 4 deletions
+1 -4
View File
@@ -108,10 +108,7 @@ class _UsbScreenState extends State<UsbScreen> {
bottomNavigationBar: Consumer<MeshCoreConnector>(
builder: (context, connector, child) {
final isLoading = _isLoadingPorts;
final showBle =
PlatformInfo.isWeb ||
PlatformInfo.isAndroid ||
PlatformInfo.isIOS;
final showBle = true;
final showTcp = !PlatformInfo.isWeb;
return SafeArea(