Swap the order in which two goroutines are started, since one relies on the other.
This commit is contained in:
1 parent
a6bebd85ed
commit
1f92ae6ba8
1 file changed
+4
-3
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user