stop connecting on thread interruption

This commit is contained in:
Konstantin Ulitin
2017-08-03 14:34:45 +03:00
parent 290d5f623f
commit 2be8631016
@@ -182,13 +182,13 @@ private fun connectNio(bootstrap: Bootstrap,
}
else if (maxAttemptCount == -1) {
sleep(300)?.let {
ConnectToChannelResult(it)
return ConnectToChannelResult(it)
}
attemptCount++
}
else if (++attemptCount < maxAttemptCount) {
sleep(attemptCount * NettyUtil.MIN_START_TIME)?.let {
ConnectToChannelResult(it)
return ConnectToChannelResult(it)
}
}
else {