Fixed client connect issue when trying to shutdown
This commit is contained in:
parent
0d01b8d303
commit
5dd9f50a0c
@ -421,7 +421,7 @@ open class Client<CONNECTION : Connection>(
|
||||
val handshakeTimeout = 5
|
||||
val timoutInNanos = TimeUnit.SECONDS.toNanos(connectionTimeoutSec.toLong())
|
||||
val startTime = System.nanoTime()
|
||||
while (timoutInNanos == 0L || System.nanoTime() - startTime < timoutInNanos) {
|
||||
while (!isShutdown() && (timoutInNanos == 0L || System.nanoTime() - startTime < timoutInNanos)) {
|
||||
try {
|
||||
val handshakeConnection = if (autoChangeToIpc) {
|
||||
buildIpcHandshake(
|
||||
|
Loading…
Reference in New Issue
Block a user