@@ -386,7 +386,7 @@ func (c *baseClient) initConn(ctx context.Context, cn *pool.Conn) error {
386
386
387
387
// for redis-server versions that do not support the HELLO command,
388
388
// RESP2 will continue to be used.
389
- if err = conn .Hello (ctx , c .opt .Protocol , username , password , c .opt .ClientName ).Err (); err == nil {
389
+ if err = conn .Hello (ctx , c .opt .Protocol , username , password , c .opt .ClientName ).Err (); err == nil {
390
390
// Authentication successful with HELLO command
391
391
} else if ! isRedisError (err ) {
392
392
// When the server responds with the RESP protocol and the result is not a normal
@@ -813,25 +813,25 @@ func (c *Client) Options() *Options {
813
813
814
814
// initializePushProcessor initializes the push notification processor for any client type.
815
815
// This is a shared helper to avoid duplication across NewClient, NewFailoverClient, and NewSentinelClient.
816
- func initializePushProcessor (opt * Options , useVoidByDefault bool ) PushNotificationProcessorInterface {
816
+ func initializePushProcessor (opt * Options ) PushNotificationProcessorInterface {
817
817
// Always use custom processor if provided
818
818
if opt .PushNotificationProcessor != nil {
819
819
return opt .PushNotificationProcessor
820
820
}
821
821
822
822
// For regular clients, respect the PushNotifications setting
823
- if ! useVoidByDefault && opt .PushNotifications {
823
+ if opt .PushNotifications {
824
824
// Create default processor when push notifications are enabled
825
825
return NewPushNotificationProcessor ()
826
826
}
827
827
828
- // Create void processor when push notifications are disabled or for specialized clients
828
+ // Create void processor when push notifications are disabled
829
829
return NewVoidPushNotificationProcessor ()
830
830
}
831
831
832
832
// initializePushProcessor initializes the push notification processor for this client.
833
833
func (c * Client ) initializePushProcessor () {
834
- c .pushProcessor = initializePushProcessor (c .opt , false )
834
+ c .pushProcessor = initializePushProcessor (c .opt )
835
835
}
836
836
837
837
// RegisterPushNotificationHandler registers a handler for a specific push notification name.
@@ -987,7 +987,7 @@ func newConn(opt *Options, connPool pool.Pooler, parentHooks *hooksMixin) *Conn
987
987
988
988
// Initialize push notification processor using shared helper
989
989
// Use void processor by default for connections (typically don't need push notifications)
990
- c .pushProcessor = initializePushProcessor (opt , true )
990
+ c .pushProcessor = initializePushProcessor (opt )
991
991
992
992
c .cmdable = c .Process
993
993
c .statefulCmdable = c .Process
0 commit comments