Skip to content

Commit

Permalink
Fixed a deadlock issue introduced in the last commit
Browse files Browse the repository at this point in the history
  • Loading branch information
XinRoom committed May 12, 2022
1 parent 55b6298 commit 6b88862
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cmd/go-portScan.go
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,11 @@ func run(c *cli.Context) error {
}
}
}
wgScan.Wait() // 扫描器-发
wgPing.Wait() // PING组
s.Wait() // 扫描器-等
s.Close() // 扫描器-收
wgScan.Wait() // 扫描器-发
wgPing.Wait() // PING组
s.Wait() // 扫描器-等
s.Close() // 扫描器-收
close(retChan)
<-single // 接收器-收
wgPortIdentify.Wait() // 识别器-收
fmt.Printf("[*] elapsed time: %s\n", time.Since(start))
Expand Down

0 comments on commit 6b88862

Please sign in to comment.