Swap the order in which two goroutines are started, since one relies on the other.

This commit is contained in:
Bryan Boreham committed 2015-06-17 11:35:01 +01:00
1 parent a6bebd85ed
commit 1f92ae6ba8
1 file changed
+4 -3
+4 -3
View File
@@ -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
}