modify max wait time to 30 seconds to auto start service

Signed-off-by: junxinlu <lujunxin@huawei.com>
This commit is contained in:
junxinlu 2022-05-12 16:18:00 +08:00
parent ad992b1733
commit 4a5031e509
4 changed files with 5 additions and 5 deletions

View File

@ -1,4 +1,4 @@
# Copyright (C) 2022-2022 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

View File

@ -1,4 +1,4 @@
# Copyright (C) 2022-2022 Huawei Device Co., Ltd.
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at

View File

@ -1074,7 +1074,7 @@ ErrCode WifiDeviceProxy::RegisterCallBack(const std::shared_ptr<IWifiDeviceCallB
WIFI_LOGD("RegisterCallBack start!");
int ret = RegisterIpcCallback(AsyncCallback, ONCE, IPC_WAIT_FOREVER, &svcIdentity_, nullptr);
if (ret != 0) {
WIFI_LOGE("[WifiScanProxy] RegisterIpcCallback failed");
WIFI_LOGE("RegisterIpcCallback failed");
return WIFI_OPT_FAILED;
}
@ -1223,4 +1223,4 @@ void WifiDeviceProxy::OnRemoteDied(void)
g_deviceCallBackStub.SetRemoteDied(true);
}
} // namespace Wifi
} // namespace OHOS
} // namespace OHOS

View File

@ -101,7 +101,7 @@ void WifiManager::AutoStartStaServiceThread(void)
struct dirent *dent = nullptr;
int currentWaitTime = 0;
const int sleepTime = 1;
const int maxWaitTimes = 10;
const int maxWaitTimes = 30;
dir = opendir("/sys/class/net");
if (dir == nullptr) {