Skip to content

Commit 3671a44

Browse files
committed
fixes
1 parent 0995d17 commit 3671a44

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

conn.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ func closeOldConnections(old []*connection, delay time.Duration) {
100100
<-t.C
101101
for _, c := range old {
102102
close(c.done)
103+
_ = c.conn.Close()
103104
}
104105
}
105106

@@ -159,12 +160,10 @@ func (r *ConnPool) responses(c *connection) {
159160
for {
160161
select {
161162
case <-c.done:
162-
_ = c.conn.Close()
163163
return
164164
default:
165165
}
166166

167-
_ = c.conn.SetReadDeadline(time.Now().Add(2 * time.Second))
168167
if n, addr, err := c.conn.ReadFrom(b); err == nil && n >= headerSize {
169168
at := time.Now()
170169
m := new(dns.Msg)

0 commit comments

Comments
 (0)