[AMQ-7301] Propagate the exception in order to close the connection cleanly

This commit is contained in:
jbonofre 2020-03-10 07:48:22 +01:00
parent 80b92d3ae9
commit 08b389c220
1 changed files with 5 additions and 9 deletions

View File

@ -57,15 +57,11 @@ public class StompNIOSSLTransport extends NIOSSLTransport {
}
@Override
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.getMessage(), e.getCause().getMessage());
protected void initializeStreams() throws IOException {
codec = new StompCodec(this);
super.initializeStreams();
if (inputBuffer.position() != 0 && inputBuffer.hasRemaining()) {
serviceRead();
}
}