Skip to content

Commit 0c44195

Browse files
authored
fix: Increase DBus call timeout for updating the master toggle switch (#290)
V25 2500U1】【Update Management System】【Control Center Update Client】【Eighth Round Testing】【System Update】【Public Network】When enabling/disabling the delivery optimization setting without entering a password, a service error popup should not appear. Fix the above issue by extending the timeout to half an hour. Log: As described above Bug: https://pms.uniontech.com/bug-view-359331.html Influence: Affects the timeout duration for authentication of the delivery master toggle switch fix: 修改更新传递总开关的dbus调用等待时间 V25 2500U1】【更新管理系统】【控制中心更新客户端】【第八轮测试】【系统更新】【公网】传递优化设置项开启关闭不输入密码,不应该弹出服务异常弹窗 修复上述问题 将等待时间延长为半小时 Log:如上所述 Bug:https://pms.uniontech.com/bug-view-359331.html Influence:影响更新传递总开关鉴权时的等待时间
1 parent 3021870 commit 0c44195

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/dcc-update-plugin/operation/updatework.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
#include "updatework.h"
66
#include "common/common/logwatcherhelper.h"
77
#include "common/dbus/mirrorinfolist.h"
8+
#include "common/commondefine.h"
89
#include "utils.h"
910
#include "dconfigwatcher.h"
1011
#include "common/common/dconfig_helper.h"
@@ -1773,7 +1774,11 @@ void UpdateWorker::setUpgradeDeliveryEnabled(bool enabled, bool fromRetryDialog)
17731774
m_model->setUpgradeDeliveryEnable(enabled);
17741775
}
17751776
};
1776-
auto watcher = new QDBusPendingCallWatcher(m_updateInter->SetUpgradeDeliveryEnable(enabled), this);
1777+
QDBusInterface updateIface(UpdaterService, UpdaterPath, UpdaterInterface,
1778+
QDBusConnection::systemBus());
1779+
updateIface.setTimeout(30 * 60 * 1000);
1780+
QDBusPendingCall call = updateIface.asyncCall(QStringLiteral("SetP2PUpdateEnable"), enabled);
1781+
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this);
17771782
connect(watcher, &QDBusPendingCallWatcher::finished, [this, watcher, enabled, func_set_success] {
17781783
watcher->deleteLater();
17791784
if (watcher->isError()) {

0 commit comments

Comments
 (0)