Browse Source

调整连接超时时间

newdev_shunjiawei
liwei1dao 11 months ago
parent
commit
4779bc1efe
  1. 2
      lib/modules/pairing/controllers/pairing_controller.dart

2
lib/modules/pairing/controllers/pairing_controller.dart

@ -730,7 +730,7 @@ class PairingController extends GetxController with WidgetsBindingObserver {
try { try {
// 设置超时定时器 // 设置超时定时器
_bleTimeoutTimer?.cancel(); _bleTimeoutTimer?.cancel();
_bleTimeoutTimer = Timer(const Duration(seconds: 10), () async { _bleTimeoutTimer = Timer(const Duration(seconds: 20), () async {
final currentBleState = await _bleManager.getConnectionState(); final currentBleState = await _bleManager.getConnectionState();
if (currentBleState == 2) { if (currentBleState == 2) {
_bleTimeoutTimer?.cancel(); _bleTimeoutTimer?.cancel();

Loading…
Cancel
Save