Skip to content

Commit 9daeb75

Browse files
committed
fix(push): address comments
1 parent 1d204c2 commit 9daeb75

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

internal/pool/pool.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,6 @@ func (p *ConnPool) dialConn(ctx context.Context, pooled bool) (*Conn, error) {
232232

233233
cn := NewConn(netConn)
234234
cn.pooled = pooled
235-
236235
return cn, nil
237236
}
238237

redis.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,9 @@ func (c *baseClient) processPushNotifications(ctx context.Context, cn *pool.Conn
11031103
// Use WithReader to access the reader and process push notifications
11041104
// This is critical for hitless upgrades to work properly
11051105
// NOTE: almost no timeouts are set for this read, so it should not block
1106-
return cn.WithReader(ctx, 1, func(rd *proto.Reader) error {
1106+
// longer than necessary, 50us should be plenty of time to read if there are any push notifications
1107+
// on the socket
1108+
return cn.WithReader(ctx, 50*time.Microsecond, func(rd *proto.Reader) error {
11071109
// Create handler context with client, connection pool, and connection information
11081110
handlerCtx := c.pushNotificationHandlerContext(cn)
11091111
return c.pushProcessor.ProcessPendingNotifications(ctx, handlerCtx, rd)

0 commit comments

Comments
 (0)