diff options
-rw-r--r-- | lib/device.dart | 3 | ||||
-rw-r--r-- | lib/main.dart | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/lib/device.dart b/lib/device.dart index 94b2899..6442ee8 100644 --- a/lib/device.dart +++ b/lib/device.dart @@ -85,11 +85,12 @@ class DeviceState extends State<DeviceScreen> { try { logger.i("Try to connect..."); // connect timeout doesn't work under Linux - await dev.connect().timeout(Duration(seconds: 1)); + await dev.connect().timeout(Duration(seconds: 2)); logger.i("Connected!"); connectStatus = "Connected"; } catch (e) { + logger.e(e); dev.disconnect().ignore(); connectStatus = e.toString(); } finally { diff --git a/lib/main.dart b/lib/main.dart index 476d6a7..b503674 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -1,5 +1,3 @@ -import 'dart:convert'; - import 'dart:io' show Platform; import 'package:badge/device.dart'; |