Skip to content

Commit 6d74994

Browse files
pppanghu77deepin-bot[bot]
authored andcommitted
perf(netif): reduce timeout value for iw command from 3s to 1s
Reduce the timeout value for the iw command from 3000ms to 1000ms to prevent the process from waiting too long when there are issues with kernel Netlink communication. Log: perf(netif): reduce timeout value for iw command from 3s to 1s Bug: https://pms.uniontech.com/bug-view-349309.html
1 parent aec73db commit 6d74994

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

deepin-system-monitor-main/system/netif.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ double NetifInfo::getWirelessSpeed(const QString &interface) {
150150
QProcess process;
151151
process.start("iw", QStringList() << "dev" << interface << "link");
152152

153-
// 添加3秒超时保护,避免 iw 命令在内核 Netlink 通信时卡死
154-
if (!process.waitForFinished(3000)) {
153+
// 添加1秒超时保护,避免 iw 命令在内核 Netlink 通信时卡死
154+
if (!process.waitForFinished(1000)) {
155155
qCWarning(app) << "iw command timeout for interface:" << interface;
156156
process.kill();
157157
process.waitForFinished();

0 commit comments

Comments
 (0)