Skip to content

Commit 8c82d76

Browse files
committed
better check if receive succeeded
1 parent 309a084 commit 8c82d76

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

libgobuster/libgobuster.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,9 @@ func (g *Gobuster) worker(wordChan <-chan string, wg *sync.WaitGroup) {
119119
select {
120120
case <-g.context.Done():
121121
return
122-
case word := <-wordChan:
122+
case word, ok := <-wordChan:
123123
// worker finished
124-
if word == "" {
124+
if !ok {
125125
return
126126
}
127127
// Mode-specific processing

0 commit comments

Comments
 (0)