Skip to content

Commit

Permalink
for client readTimeout use MAX(<sx>, <cy>)
Browse files Browse the repository at this point in the history
  • Loading branch information
colinzuo committed Nov 8, 2023
1 parent 1d7faae commit 319b37b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,10 @@ func Connect(conn io.ReadWriteCloser, opts ...func(*Conn) error) (*Conn, error)
}
}

if readTimeout < options.ReadTimeout {
readTimeout = options.ReadTimeout
}

c.readTimeout = readTimeout
c.writeTimeout = writeTimeout

Expand Down

0 comments on commit 319b37b

Please sign in to comment.