fix: ASW-65 停止捕包时等待 tcpdump 资源释放,防止 pcap 不全

This commit is contained in:
shizhendong
2024-09-10 16:54:16 +08:00
parent 87e211987b
commit 7eb678813f
3 changed files with 18 additions and 1 deletions

View File

@@ -142,7 +142,7 @@ public class APIController {
}
@DeleteMapping("/pcap")
public void stopTcpdump(@RequestParam String id,
public synchronized void stopTcpdump(@RequestParam String id,
@RequestParam(required = false, defaultValue = "false") Boolean returnFile,
HttpServletResponse response) throws IOException {
AdbUtil.CommandResult result = adbUtil.stopTcpdump(id);