Close channel

This commit is contained in:
Bryan Boreham committed 2014-10-06 17:57:35 +01:00
1 parent 574bc2cb9e
commit 2d142abd3e
1 file changed
+1
+1
View File
@@ -196,6 +196,7 @@ func (c *MDNSClient) handleResponse(r *dns.Msg) {
if query, found := c.inflight[rr.Hdr.Name]; found {
for _, resp := range query.responseInfos {
resp.ch <- &ResponseA{Name: rr.Hdr.Name, Addr: rr.A}
close(resp.ch)
}
// To be simple for now, assume this is the only response coming
delete(c.inflight, rr.Hdr.Name)