Heart-beat log message potentially without session id

Issue: SPR-15937
This commit is contained in:
Juergen Hoeller 2017-09-08 16:55:27 +02:00
parent 496223a927
commit aa4ae7a750
1 changed files with 2 additions and 1 deletions

View File

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