Skip to content

Commit 6aaafd7

Browse files
committed
core/connpool: m code comment
1 parent 4b42383 commit 6aaafd7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

intra/core/connpool.go

+4-2
Original file line numberDiff line numberDiff line change
@@ -279,9 +279,11 @@ func canread(sc syscall.Conn) error {
279279
return fmt.Errorf("pool: sysconn: %w", err)
280280
}
281281

282-
if useread {
282+
if useread { // stackoverflow.com/q/12741386
283283
ctlErr = raw.Read(func(fd uintptr) bool {
284-
// pitfall: github.com/redis/go-redis/issues/3137
284+
// 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
285287
var buf [1]byte
286288
n, err := syscall.Read(int(fd), buf[:])
287289
switch {

0 commit comments

Comments
 (0)