diff --git a/internal/pool/pool.go b/internal/pool/pool.go index 892326a5..77592cdd 100644 --- a/internal/pool/pool.go +++ b/internal/pool/pool.go @@ -232,7 +232,6 @@ func (p *ConnPool) dialConn(ctx context.Context, pooled bool) (*Conn, error) { cn := NewConn(netConn) cn.pooled = pooled - return cn, nil } diff --git a/push/errors.go b/push/errors.go index fd3497a2..6651ebe4 100644 --- a/push/errors.go +++ b/push/errors.go @@ -140,18 +140,3 @@ func IsVoidProcessorError(err error) bool { } return false } - -// extractNotificationName attempts to extract the notification name from error messages -func extractNotificationName(err error) string { - if handlerErr, ok := err.(*HandlerError); ok { - if handlerErr.PushNotificationName != "" { - return handlerErr.PushNotificationName - } - } - if procErr, ok := err.(*ProcessorError); ok { - if procErr.PushNotificationName != "" { - return procErr.PushNotificationName - } - } - return "unknown" -} diff --git a/redis.go b/redis.go index 43673863..f7ee12fa 100644 --- a/redis.go +++ b/redis.go @@ -1103,7 +1103,9 @@ func (c *baseClient) processPushNotifications(ctx context.Context, cn *pool.Conn // Use WithReader to access the reader and process push notifications // This is critical for hitless upgrades to work properly // NOTE: almost no timeouts are set for this read, so it should not block - return cn.WithReader(ctx, 1, func(rd *proto.Reader) error { + // longer than necessary, 50us should be plenty of time to read if there are any push notifications + // on the socket + return cn.WithReader(ctx, 50*time.Microsecond, func(rd *proto.Reader) error { // Create handler context with client, connection pool, and connection information handlerCtx := c.pushNotificationHandlerContext(cn) return c.pushProcessor.ProcessPendingNotifications(ctx, handlerCtx, rd)