fix(api): clear sniff deadline before entering Redis handler

Clear the 10s read deadline before calling handleRedisConnection so
that authenticated Redis clients are not disconnected by an i/o timeout
after 10 seconds of idle time. HTTP paths already clear the deadline
after routing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
lihan3238
2026-05-10 15:43:58 +08:00
parent 28dfcae350
commit c5596e0925

View File

@@ -115,6 +115,7 @@ func (s *Server) routeMuxConnection(conn net.Conn, httpListener *muxListener) {
}
return
}
_ = conn.SetReadDeadline(time.Time{})
s.handleRedisConnection(conn, reader)
return
}