Skip to content

Commit

Permalink
Restore behaviour of MDNSClient.actorLoop() on exit
Browse files Browse the repository at this point in the history
  • Loading branch information
bboreham committed Jun 17, 2015
1 parent baf6dee commit 0fc3d79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion nameserver/mdns_client.go
Expand Up @@ -265,12 +265,13 @@ func (c *MDNSClient) checkInFlightQueries() time.Duration {
func (c *MDNSClient) actorLoop(actionChan <-chan MDNSAction) {
timer := time.NewTimer(MaxDuration)
run := func() { timer.Reset(c.checkInFlightQueries()) }
loop:
for {
select {
case action := <-actionChan:
if action == nil {
c.listener.Shutdown()
return
break loop
} else {
action()
run()
Expand Down

0 comments on commit 0fc3d79

Please sign in to comment.