Skip to content

Commit 2d59a6b

Browse files
committed
remove different behavior for local reconnect
1 parent 010c0b3 commit 2d59a6b

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/redis-adapter.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,6 @@ const _subscribedMessageHandler = async (message, channel) => {
8484
);
8585
};
8686

87-
const _localReconnectStrategy = () =>
88-
new VError({ name: VERROR_CLUSTER_NAME }, "disabled reconnect, because we are not running on cloud foundry");
89-
90-
//
9187
const _getRedisOptionsTuple = () => {
9288
if (!__activeOptionsTuple) {
9389
const defaultClientOptions = {
@@ -138,13 +134,6 @@ const _getRedisOptionsTuple = () => {
138134
redisClientOptions.socket.tls = !!redisClientOptions.socket.tls;
139135
}
140136

141-
if (
142-
redisClientOptions.socket.host === "localhost" &&
143-
!Object.prototype.hasOwnProperty.call(redisClientOptions.socket, "reconnectStrategy")
144-
) {
145-
redisClientOptions.socket.reconnectStrategy = _localReconnectStrategy;
146-
}
147-
148137
__activeOptionsTuple = [isCluster, redisClientOptions];
149138
}
150139

@@ -651,7 +640,6 @@ module.exports = {
651640
_getSubscriberClient: () => __subscriberClientPromise,
652641
_setSubscriberClient: (value) => (__subscriberClientPromise = value),
653642
_subscribedMessageHandler,
654-
_localReconnectStrategy,
655643
_createClientBase,
656644
_createClientAndConnect,
657645
_clientExec,

0 commit comments

Comments
 (0)