Merge pull request #507 from jbonofre/AMQ-7301

[AMQ-7301] Propagate the exception in order to close the connection cleanly
This commit is contained in:
Jean-Baptiste Onofré 2020-03-10 07:58:18 +01:00 committed by GitHub
commit bbb73ec3fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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();
}
}