File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -906,6 +906,8 @@ func NewClient(opt *Options) *Client {
906906 if opt == nil {
907907 panic ("redis: NewClient nil options" )
908908 }
909+ // clone to not share options with the caller
910+ opt = opt .clone ()
909911 opt .init ()
910912
911913 // Push notifications are always enabled for RESP3 (cannot be disabled)
@@ -920,8 +922,8 @@ func NewClient(opt *Options) *Client {
920922 // Initialize push notification processor using shared helper
921923 // Use void processor for RESP2 connections (push notifications not available)
922924 c .pushProcessor = initializePushProcessor (opt )
923- // Update options with the initialized push processor
924- opt .PushNotificationProcessor = c .pushProcessor
925+ // set opt push processor for child clients
926+ c . opt .PushNotificationProcessor = c .pushProcessor
925927
926928 // Create connection pools
927929 var err error
You can’t perform that action at this time.
0 commit comments