Skip to content

Commit

Permalink
close channels for portscan.go
Browse files Browse the repository at this point in the history
  • Loading branch information
vanshaj committed May 30, 2021
1 parent 5fa81e2 commit 5f8b6f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions blackhatgo/chapter2/portscan.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ func main() {
openPorts = append(openPorts, p)
}
}
//close(portS)
//close(results)
close(portS)
close(results)
sort.Ints(openPorts)
for _, port := range openPorts {
fmt.Printf("%d open\n", port)
Expand Down

0 comments on commit 5f8b6f4

Please sign in to comment.