Skip to content

Commit

Permalink
Merge pull request #178 from mfreeman451/updates/cleanup
Browse files Browse the repository at this point in the history
cleanup
  • Loading branch information
mfreeman451 authored Feb 4, 2025
2 parents 7bb56e7 + 08effb0 commit a9480c4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions pkg/scan/icmp_scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ func (*socketPool) createSocket(now time.Time) (*socketEntry, error) {
return entry, nil
}

// recycleSocket finds an idle socket, closes it, and recreates it.
// recycleSocket finds an idle socket, closes it, and recreates it.
func (p *socketPool) recycleSocket(now time.Time) (*socketEntry, error) {
for _, entry := range p.sockets {
Expand Down Expand Up @@ -309,7 +308,7 @@ func NewICMPScanner(timeout time.Duration, concurrency, count int) (*ICMPScanner
socketPool: newSocketPool(defaultMaxSockets, defaultMaxSocketAge, defaultMaxIdleTime),
bufferPool: newBufferPool(maxPacketSize),
done: make(chan struct{}),
closeDoneOnce: sync.Once{}, // ADDED
closeDoneOnce: sync.Once{},
responses: sync.Map{},
}

Expand Down

0 comments on commit a9480c4

Please sign in to comment.