Skip to content

Commit 9eeed03

Browse files
author
dklodka
committed
review fixes
1 parent eab706f commit 9eeed03

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

redis/src/main/scala/com/avsystem/commons/redis/actor/RedisConnectionActor.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ final class RedisConnectionActor(address: NodeAddress, config: ConnectionConfig)
227227
val initBatch = config.initCommands *> RedisApi.Batches.StringTyped.ping
228228
val initBuffer = ByteBuffer.allocate(initBatch.rawCommandPacks.encodedSize)
229229
// schedule a Cancellable RetryInit in case we do not receive a response for our request
230-
val scheduledRetry = system.scheduler.scheduleOnce(config.initTimeout, self, RetryInit(retryStrategy.next))
230+
val scheduledRetry = system.scheduler.scheduleOnce(config.initResponseTimeout, self, RetryInit(retryStrategy.next))
231231
new ReplyCollector(initBatch.rawCommandPacks, initBuffer, onInitResult(_, retryStrategy))
232232
.sendEmptyReplyOr { collector =>
233233
flip(initBuffer)

redis/src/main/scala/com/avsystem/commons/redis/config/config.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ case class NodeConfig(
155155
* @param idleTimeout maximum idle time for the connection
156156
* @param maxWriteSizeHint hint for maximum number of bytes sent in a single network write message (the actual number
157157
* of bytes sent may be slightly larger)
158-
* @param initTimeout maximum time to wait for Redis response while initializing the client
158+
* @param initResponseTimeout maximum time to wait for Redis response while initializing the client
159159
* @param reconnectionStrategy a [[RetryStrategy]] used to determine what delay should be used when reconnecting
160160
* a failed connection. NOTE: `reconnectionStrategy` is ignored by `RedisConnectionClient`
161161
* @param debugListener listener for traffic going through this connection. Only for debugging and testing
@@ -170,7 +170,7 @@ case class ConnectionConfig(
170170
connectTimeout: OptArg[FiniteDuration] = OptArg.Empty,
171171
idleTimeout: OptArg[FiniteDuration] = OptArg.Empty,
172172
maxWriteSizeHint: OptArg[Int] = 50000,
173-
initTimeout: FiniteDuration = 5.seconds,
173+
initResponseTimeout: FiniteDuration = 15.seconds,
174174
reconnectionStrategy: RetryStrategy = immediately.andThen(exponentially(1.seconds)).maxDelay(8.seconds),
175175
debugListener: DebugListener = DevNullListener
176176
)

0 commit comments

Comments
 (0)