We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b42383 commit 6aaafd7Copy full SHA for 6aaafd7
intra/core/connpool.go
@@ -279,9 +279,11 @@ func canread(sc syscall.Conn) error {
279
return fmt.Errorf("pool: sysconn: %w", err)
280
}
281
282
- if useread {
+ if useread { // stackoverflow.com/q/12741386
283
ctlErr = raw.Read(func(fd uintptr) bool {
284
- // pitfall: github.com/redis/go-redis/issues/3137
+ // 0 byte reads do not work to detect readability:
285
+ // see: go-review.googlesource.com/c/go/+/23227
286
+ // pitfalls: github.com/redis/go-redis/issues/3137
287
var buf [1]byte
288
n, err := syscall.Read(int(fd), buf[:])
289
switch {
0 commit comments