clientIP returns the connection's client IP as a string, or "" if unavailable (e.g. a non-TCP conn or in tests). Used for the redacted Errors-page snapshot.
()
| 562 | c.cancel() |
| 563 | return |
| 564 | } |
| 565 | // Data available (e.g. pipelined Sync message) — safe in the |
| 566 | // bufio.Reader buffer. Throttle to avoid busy-waiting since |
| 567 | // Peek returns instantly when data is already buffered. |
| 568 | select { |
| 569 | case <-done: |
| 570 | return |
| 571 | case <-ctx.Done(): |
| 572 | return |
| 573 | case <-time.After(50 * time.Millisecond): |
| 574 | continue |
| 575 | } |
no test coverage detected