mirror of
https://github.com/corda/corda.git
synced 2025-02-20 09:26:41 +00:00
ENT-2036 Handle ClosedChannelException during SSL handshake (#3314)
This commit is contained in:
parent
e2b4943bbb
commit
5f2c3d175d
@ -21,6 +21,7 @@ import org.apache.qpid.proton.engine.impl.ProtocolTracer
|
||||
import org.apache.qpid.proton.framing.TransportFrame
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.net.InetSocketAddress
|
||||
import java.nio.channels.ClosedChannelException
|
||||
import java.security.cert.X509Certificate
|
||||
|
||||
/**
|
||||
@ -102,7 +103,12 @@ internal class AMQPChannelHandler(private val serverMode: Boolean,
|
||||
createAMQPEngine(ctx)
|
||||
onOpen(Pair(ctx.channel() as SocketChannel, ConnectionChange(remoteAddress, remoteCert, true, false)))
|
||||
} else {
|
||||
badCert = true
|
||||
// This happens when the peer node is closed during SSL establishment.
|
||||
if (evt.cause() is ClosedChannelException) {
|
||||
log.warn("SSL Handshake closed early.")
|
||||
} else {
|
||||
badCert = true
|
||||
}
|
||||
log.error("Handshake failure ${evt.cause().message}")
|
||||
if (log.isTraceEnabled) {
|
||||
log.trace("Handshake failure", evt.cause())
|
||||
|
Loading…
x
Reference in New Issue
Block a user