Merge pull request #695 from jbonofre/AMQ-8252

[AMQ-8252] Doesn't display warn stack trace for stomp (regression compared to 5.15.x)
This commit is contained in:
Jean-Baptiste Onofré 2021-08-04 08:23:59 +02:00 committed by GitHub
commit f7f52ccc7a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 1 deletions

View File

@ -247,7 +247,12 @@ public class TransportConnection implements Connection, Task, CommandVisitor {
}
private boolean suppressed(IOException e) {
return !connector.isWarnOnRemoteClose() && ((e instanceof SocketException && e.getMessage().indexOf("reset") != -1) || e instanceof EOFException);
return (isStomp() || !connector.isWarnOnRemoteClose()) && ((e instanceof SocketException && e.getMessage().indexOf("reset") != -1) || e instanceof EOFException);
}
private boolean isStomp() {
URI uri = connector.getUri();
return uri != null && uri.getScheme() != null && uri.getScheme().indexOf("stomp") != -1;
}
/**