Reduce logging for unsent SUBSCRIBE messages
Closes gh-28252
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright 2002-2023 the original author or authors.
|
* Copyright 2002-2024 the original author or authors.
|
||||||
*
|
*
|
||||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
* you may not use this file except in compliance with the License.
|
* you may not use this file except in compliance with the License.
|
||||||
@@ -366,10 +366,10 @@ public class StompSubProtocolHandler implements SubProtocolHandler, ApplicationE
|
|||||||
logger.debug("Failed to send message to MessageChannel in session " + session.getId(), ex);
|
logger.debug("Failed to send message to MessageChannel in session " + session.getId(), ex);
|
||||||
}
|
}
|
||||||
else if (logger.isErrorEnabled()) {
|
else if (logger.isErrorEnabled()) {
|
||||||
// Skip unsent CONNECT messages (likely auth issues)
|
// Skip for unsent CONNECT or SUBSCRIBE (likely authentication/authorization issues)
|
||||||
if (!isConnect || sent) {
|
if (sent || !(isConnect || StompCommand.SUBSCRIBE.equals(command))) {
|
||||||
logger.error("Failed to send message to MessageChannel in session " + session.getId() +
|
logger.error("Failed to send message to MessageChannel in session " +
|
||||||
":" + ex.getMessage());
|
session.getId() + ":" + ex.getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
handleError(session, ex, message);
|
handleError(session, ex, message);
|
||||||
|
|||||||
Reference in New Issue
Block a user