Skip to content

Commit

Permalink
delete defer
Browse files Browse the repository at this point in the history
  • Loading branch information
andriibeee committed Nov 13, 2024
1 parent 4b01ac4 commit ca3439d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ func (c *Conn) clearWriteTimeout() {

func (c *Conn) setupReadTimeout(ctx context.Context) {
hammerTime := context.AfterFunc(ctx, func() {
defer c.close()
c.close()
})

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

0 comments on commit ca3439d

Please sign in to comment.