File tree 1 file changed +10
-5
lines changed
1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -55,15 +55,20 @@ export default class ClusterSubscriber {
55
55
const { options} = sampleNode
56
56
debug ( 'selected a subscriber %s:%s' , options . host , options . port )
57
57
58
- // Create a specialized Redis connection for the subscription.
59
- // Note that auto reconnection is enabled here.
60
- // `enableReadyCheck` is disabled because subscription is allowed
61
- // when redis is loading data from the disk.
58
+ /*
59
+ * Create a specialized Redis connection for the subscription.
60
+ * Note that auto reconnection is enabled here.
61
+ *
62
+ * `enableReadyCheck` is also enabled because although subscription is allowed
63
+ * while redis is loading data from the disk, we can check if the password
64
+ * provided for the subscriber is correct, and if not, the current subscriber
65
+ * will be disconnected and a new subscriber will be selected.
66
+ */
62
67
this . subscriber = new Redis ( {
63
68
port : options . port ,
64
69
host : options . host ,
65
70
password : options . password ,
66
- enableReadyCheck : false ,
71
+ enableReadyCheck : true ,
67
72
connectionName : SUBSCRIBER_CONNECTION_NAME ,
68
73
lazyConnect : true
69
74
} )
You can’t perform that action at this time.
0 commit comments