Parcourir la source

优化修改代码, 增强代码的稳定性

niujiuru il y a 1 mois
Parent
commit
e30b3c1b1f
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2 0
      netmgrd/netmgrd.go

+ 2 - 0
netmgrd/netmgrd.go

@@ -258,11 +258,13 @@ func openNetwork() {
 		case Air720U: //合宙4G调制解调器
 			if eth2CableOK, _ := modem1.Is4GCableConnected(); eth2CableOK {
 				startOK = modem1.Start4GNetwork()
+				time.Sleep(time.Duration(500) * time.Millisecond)
 				enableEth0() // 恢复有线网口
 			}
 		case EC200U: // 移远4G调制解调器
 			if usb0CableOK, _ := modem2.Is4GCableConnected(); usb0CableOK {
 				startOK = modem2.Start4GNetwork()
+				time.Sleep(time.Duration(500) * time.Millisecond)
 				enableEth0() // 恢复有线网口
 			}
 		}