Skip to content

Commit

Permalink
Swap the order in which two goroutines are started, since one relies …
Browse files Browse the repository at this point in the history
…on the other.
  • Loading branch information
bboreham committed Jun 16, 2015
1 parent e1de318 commit aa85e19
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions nameserver/mdns_client.go
Expand Up @@ -128,12 +128,13 @@ func (c *MDNSClient) Start(ifi *net.Interface) (err error) {
}
}

c.listener = &dns.Server{Unsafe: true, PacketConn: multicast, Handler: dns.HandlerFunc(handleMDNS)}
go c.listener.ActivateAndServe()

actionChan := make(chan MDNSAction, MailboxSize)
c.actionChan = actionChan
go c.actorLoop(actionChan)

c.listener = &dns.Server{Unsafe: true, PacketConn: multicast, Handler: dns.HandlerFunc(handleMDNS)}
go c.listener.ActivateAndServe()

return nil
}

Expand Down

0 comments on commit aa85e19

Please sign in to comment.