Skip to content

Commit

Permalink
Log connection info in StompBrokerRelayMessageHandler
Browse files Browse the repository at this point in the history
  • Loading branch information
rstoyanchev committed Nov 23, 2022
1 parent e77c426 commit a3c8909
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Expand Up @@ -442,7 +442,7 @@ protected void startInternal() {
}

if (logger.isInfoEnabled()) {
logger.info("Starting \"system\" session, " + toString());
logger.info("Starting \"system\" session, " + this);
}

StompHeaderAccessor accessor = StompHeaderAccessor.create(StompCommand.CONNECT);
Expand Down Expand Up @@ -699,7 +699,7 @@ protected TcpConnection<byte[]> getTcpConnection() {
@Override
public void afterConnected(TcpConnection<byte[]> connection) {
if (logger.isDebugEnabled()) {
logger.debug("TCP connection opened in session=" + getSessionId());
logger.debug("TCP connection " + connection + " opened in session=" + getSessionId());
}
this.tcpConnection = connection;
connection.onReadInactivity(() -> {
Expand Down Expand Up @@ -978,7 +978,7 @@ public void clearConnection() {
this.tcpConnection = null;
if (conn != null) {
if (logger.isDebugEnabled()) {
logger.debug("Closing TCP connection in session " + this.sessionId);
logger.debug("Closing TCP connection " + conn + " in session " + this.sessionId);
}
conn.close();
}
Expand Down
Expand Up @@ -81,4 +81,8 @@ public void close() {
this.completionSink.tryEmitEmpty();
}

@Override
public String toString() {
return "ReactorNetty2TcpConnection[inbound=" + this.inbound + "]";
}
}
Expand Up @@ -80,4 +80,9 @@ public void close() {
this.completionSink.tryEmitEmpty();
}

@Override
public String toString() {
return "ReactorNettyTcpConnection[inbound=" + this.inbound + "]";
}

}

0 comments on commit a3c8909

Please sign in to comment.