Skip to content

Commit

Permalink
pillar/devicenetwork: fix goroutine leak
Browse files Browse the repository at this point in the history
introduced in 8573372

without this fix, the goroutine is blocked by trying to send
into a channel that has no receiver

Signed-off-by: Christoph Ostarek <[email protected]>
  • Loading branch information
christoph-zededa committed Oct 31, 2024
1 parent 7534022 commit a4f6777
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/pillar/devicenetwork/dns.go
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,10 @@ func ResolveWithPortsLambda(domain string,
errs = append(errs, err)
}
if response != nil {
resolvedIPsChan <- response
select {
case <-quit:
case resolvedIPsChan <- response:
}
}
<-work
wg.Done()
Expand Down

0 comments on commit a4f6777

Please sign in to comment.