mirror of https://github.com/apache/activemq.git
Merge pull request #488 from jbonofre/AMQ-7301
[AMQ-7301] Display warn in case of STOMP stream initialize error
This commit is contained in:
commit
0d0131496a
|
@ -29,9 +29,13 @@ import javax.net.ssl.SSLEngine;
|
||||||
|
|
||||||
import org.apache.activemq.transport.nio.NIOSSLTransport;
|
import org.apache.activemq.transport.nio.NIOSSLTransport;
|
||||||
import org.apache.activemq.wireformat.WireFormat;
|
import org.apache.activemq.wireformat.WireFormat;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
public class StompNIOSSLTransport extends NIOSSLTransport {
|
public class StompNIOSSLTransport extends NIOSSLTransport {
|
||||||
|
|
||||||
|
private final static Logger LOGGER = LoggerFactory.getLogger(StompNIOSSLTransport.class);
|
||||||
|
|
||||||
StompCodec codec;
|
StompCodec codec;
|
||||||
|
|
||||||
private X509Certificate[] cachedPeerCerts;
|
private X509Certificate[] cachedPeerCerts;
|
||||||
|
@ -52,11 +56,15 @@ public class StompNIOSSLTransport extends NIOSSLTransport {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void initializeStreams() throws IOException {
|
protected void initializeStreams() {
|
||||||
codec = new StompCodec(this);
|
try {
|
||||||
super.initializeStreams();
|
codec = new StompCodec(this);
|
||||||
if (inputBuffer.position() != 0 && inputBuffer.hasRemaining()) {
|
super.initializeStreams();
|
||||||
serviceRead();
|
if (inputBuffer.position() != 0 && inputBuffer.hasRemaining()) {
|
||||||
|
serviceRead();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
LOGGER.warn("Could not initialize connection from {}", socket.getInetAddress().getHostAddress(), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue