refactor: move a func that is only used in testing
This commit is contained in:
1 parent
b83f4c9ee9
commit
e7335f361c
2 files changed
+4
-5
No files matched your search
@@ -105,11 +105,6 @@ func LinkLocalMulticastListener(ifi *net.Interface) (net.PacketConn, error) {
|
||||
|
||||
type MDNSAction func()
|
||||
|
||||
// Async
|
||||
func (c *MDNSClient) Shutdown() {
|
||||
c.actionChan <- nil
|
||||
}
|
||||
|
||||
// Async
|
||||
func (c *MDNSClient) SendQuery(name string, querytype uint16, responseCh chan<- *Response) {
|
||||
c.actionChan <- func() {
|
||||
|
||||
@@ -85,6 +85,10 @@ func setup(t *testing.T) (*MDNSClient, *dns.Server, error) {
|
||||
return mdnsClient, server, err
|
||||
}
|
||||
|
||||
func (c *MDNSClient) Shutdown() {
|
||||
c.actionChan <- nil
|
||||
}
|
||||
|
||||
type testContext struct {
|
||||
receivedAddr net.IP
|
||||
receivedCount int
|
||||
|
||||
Reference in new issue
Block a user