Skip to content

Commit 357226b

Browse files
committed
Add host description when throwing MissedHeartbeatException
1 parent 0b7d8f0 commit 357226b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/rabbitmq/client/impl/AMQConnection.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,7 @@ private void readFrame(Frame frame) throws IOException {
742742
/** private API */
743743
public void handleHeartbeatFailure() {
744744
Exception ex = new MissedHeartbeatException("Heartbeat missing with heartbeat = " +
745-
_heartbeat + " seconds");
745+
_heartbeat + " seconds, for " + this.getHostAddress());
746746
try {
747747
_exceptionHandler.handleUnexpectedConnectionDriverException(this, ex);
748748
shutdown(null, false, ex, true);
@@ -837,7 +837,7 @@ private void handleSocketTimeout() throws SocketTimeoutException {
837837
// of the heartbeat setting in setHeartbeat above.
838838
if (++_missedHeartbeats > (2 * 4)) {
839839
throw new MissedHeartbeatException("Heartbeat missing with heartbeat = " +
840-
_heartbeat + " seconds");
840+
_heartbeat + " seconds, for " + this.getHostAddress());
841841
}
842842
}
843843

0 commit comments

Comments
 (0)