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.wireformat.WireFormat;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class StompNIOSSLTransport extends NIOSSLTransport {
|
||||
|
||||
private final static Logger LOGGER = LoggerFactory.getLogger(StompNIOSSLTransport.class);
|
||||
|
||||
StompCodec codec;
|
||||
|
||||
private X509Certificate[] cachedPeerCerts;
|
||||
|
@ -52,11 +56,15 @@ public class StompNIOSSLTransport extends NIOSSLTransport {
|
|||
}
|
||||
|
||||
@Override
|
||||
protected void initializeStreams() throws IOException {
|
||||
codec = new StompCodec(this);
|
||||
super.initializeStreams();
|
||||
if (inputBuffer.position() != 0 && inputBuffer.hasRemaining()) {
|
||||
serviceRead();
|
||||
protected void initializeStreams() {
|
||||
try {
|
||||
codec = new StompCodec(this);
|
||||
super.initializeStreams();
|
||||
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