Heart-beat log message potentially without session id

Issue: SPR-15937
master
Juergen Hoeller 7 years ago
parent 496223a927
commit aa4ae7a750
  1. 3
      spring-messaging/src/main/java/org/springframework/messaging/simp/stomp/StompHeaderAccessor.java

@ -429,7 +429,8 @@ public class StompHeaderAccessor extends SimpMessageHeaderAccessor {
@Override @Override
public String getDetailedLogMessage(@Nullable Object payload) { public String getDetailedLogMessage(@Nullable Object payload) {
if (isHeartbeat()) { if (isHeartbeat()) {
return "heart-beat in session " + getSessionId(); String sessionId = getSessionId();
return "heart-beat" + (sessionId != null ? " in session " + sessionId : "");
} }
StompCommand command = getCommand(); StompCommand command = getCommand();
if (command == null) { if (command == null) {

Loading…
Cancel
Save