Skip to content

Commit ca3439d

Browse files
committed
delete defer
1 parent 4b01ac4 commit ca3439d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

conn.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ func (c *Conn) clearWriteTimeout() {
179179

180180
func (c *Conn) setupReadTimeout(ctx context.Context) {
181181
hammerTime := context.AfterFunc(ctx, func() {
182-
defer c.close()
182+
c.close()
183183
})
184184

185185
if closer := c.readTimeoutCloser.Swap(hammerTime); closer != nil {

0 commit comments

Comments
 (0)