Fixed client handshake timeout
This commit is contained in:
parent
9e52c398d6
commit
67bf5e2b21
|
@ -212,7 +212,7 @@ internal class ClientHandshake<CONNECTION: Connection>(
|
||||||
val subscription = handshakeConnection.subscription
|
val subscription = handshakeConnection.subscription
|
||||||
val pollIdleStrategy = endPoint.pollIdleStrategyHandShake
|
val pollIdleStrategy = endPoint.pollIdleStrategyHandShake
|
||||||
|
|
||||||
val timoutInNanos = TimeUnit.SECONDS.toMillis(connectionTimeoutSec.toLong())
|
val timoutInNanos = TimeUnit.SECONDS.toNanos(connectionTimeoutSec.toLong())
|
||||||
var startTime = System.nanoTime()
|
var startTime = System.nanoTime()
|
||||||
while (timoutInNanos == 0L || System.nanoTime() - startTime < timoutInNanos) {
|
while (timoutInNanos == 0L || System.nanoTime() - startTime < timoutInNanos) {
|
||||||
// NOTE: regarding fragment limit size. Repeated calls to '.poll' will reassemble a fragment.
|
// NOTE: regarding fragment limit size. Repeated calls to '.poll' will reassemble a fragment.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user