Skip to content

Commit

Permalink
Add host description when throwing MissedHeartbeatException
Browse files Browse the repository at this point in the history
  • Loading branch information
laststem committed Mar 10, 2022
1 parent 0b7d8f0 commit 357226b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/com/rabbitmq/client/impl/AMQConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ private void readFrame(Frame frame) throws IOException {
/** private API */
public void handleHeartbeatFailure() {
Exception ex = new MissedHeartbeatException("Heartbeat missing with heartbeat = " +
_heartbeat + " seconds");
_heartbeat + " seconds, for " + this.getHostAddress());
try {
_exceptionHandler.handleUnexpectedConnectionDriverException(this, ex);
shutdown(null, false, ex, true);
Expand Down Expand Up @@ -837,7 +837,7 @@ private void handleSocketTimeout() throws SocketTimeoutException {
// of the heartbeat setting in setHeartbeat above.
if (++_missedHeartbeats > (2 * 4)) {
throw new MissedHeartbeatException("Heartbeat missing with heartbeat = " +
_heartbeat + " seconds");
_heartbeat + " seconds, for " + this.getHostAddress());
}
}

Expand Down

0 comments on commit 357226b

Please sign in to comment.