Commit aec73db
fix: (timeout)add timeout protection for wireless speed detection
- Include ddlog.h header for logging functionality
- Add DDLog namespace usage for enhanced logging capabilities
- Implement 3-second timeout protection in getWirelessSpeed method to prevent
iw command from hanging during kernel Netlink communication
- Add proper error handling with process termination when timeout occurs
- Return -1 to indicate failure when wireless speed cannot be obtained
Log: fix: (timeout)add timeout protection for wireless speed detection
Bug: https://github.com/linuxdeepin/deepin-system-monitor/pull/489/changes1 parent ac45bcc commit aec73db
1 file changed
+14
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
23 | 26 | | |
24 | 27 | | |
25 | 28 | | |
| |||
146 | 149 | | |
147 | 150 | | |
148 | 151 | | |
149 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
150 | 161 | | |
151 | 162 | | |
152 | 163 | | |
153 | 164 | | |
154 | 165 | | |
155 | | - | |
| 166 | + | |
156 | 167 | | |
157 | 168 | | |
158 | 169 | | |
159 | 170 | | |
160 | | - | |
| 171 | + | |
161 | 172 | | |
162 | 173 | | |
163 | 174 | | |
| |||
0 commit comments