|
@@ -312,10 +312,7 @@ class WdKeepAliveService : AbsWorkService() {
|
|
|
Log.w(TAG, "断网唤醒CPU")
|
|
|
// val wakeLock = Util.wakeUpAndUnlock(this@WdKeepAliveService)
|
|
|
if (TcpClient.getInstance().retryTimes < 30) {
|
|
|
- if (TcpClient.getInstance().channel == null || TcpClient.getInstance().bootstrap == null) {
|
|
|
-// TcpClient.getInstance().doConnect(iTcpCallBack)
|
|
|
- TcpClient.getInstance().init(Constants.tcpServer, Constants.tcpPort, Constants.heartBeat, iTcpCallBack)
|
|
|
- }
|
|
|
+ TcpClient.getInstance().init(Constants.tcpServer, Constants.tcpPort, Constants.heartBeat, iTcpCallBack)
|
|
|
} else {
|
|
|
AppUtils.restartApp()
|
|
|
}
|