File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
spring-websocket/src/main/java/org/springframework/web/socket/messaging Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright 2002-2023 the original author or authors.
2
+ * Copyright 2002-2024 the original author or authors.
3
3
*
4
4
* Licensed under the Apache License, Version 2.0 (the "License");
5
5
* you may not use this file except in compliance with the License.
@@ -366,10 +366,10 @@ else if (StompCommand.UNSUBSCRIBE.equals(command)) {
366
366
logger .debug ("Failed to send message to MessageChannel in session " + session .getId (), ex );
367
367
}
368
368
else if (logger .isErrorEnabled ()) {
369
- // Skip unsent CONNECT messages (likely auth issues)
370
- if (! isConnect || sent ) {
371
- logger .error ("Failed to send message to MessageChannel in session " + session . getId () +
372
- ":" + ex .getMessage ());
369
+ // Skip for unsent CONNECT or SUBSCRIBE (likely authentication/authorization issues)
370
+ if (sent || !( isConnect || StompCommand . SUBSCRIBE . equals ( command )) ) {
371
+ logger .error ("Failed to send message to MessageChannel in session " +
372
+ session . getId () + ":" + ex .getMessage ());
373
373
}
374
374
}
375
375
handleError (session , ex , message );
You can’t perform that action at this time.
0 commit comments