If reconnect is called on a client WITHOUT being first closed, it will close first.
This commit is contained in:
parent
364b29fd0c
commit
f631dea046
|
@ -226,6 +226,12 @@ open class Client<CONNECTION : Connection>(
|
|||
logger.info { "Reconnecting... (timeout in $connectionTimeoutSec seconds)" }
|
||||
}
|
||||
|
||||
if (!isShutdown()) {
|
||||
// if we aren't closed already, close now.
|
||||
close(false)
|
||||
waitForClose()
|
||||
}
|
||||
|
||||
connect(
|
||||
remoteAddress = address,
|
||||
remoteAddressString = addressString,
|
||||
|
|
Loading…
Reference in New Issue