Skip to content

Commit 08d2172

Browse files
author
Matthew Sackman
committed
Ignore call to setHeartbeat if the heartbeatsender is already shutdown
1 parent 071338e commit 08d2172

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/com/rabbitmq/client/impl/HeartbeatSender.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,7 @@ public void signalActivity() {
7575
public void setHeartbeat(int heartbeatSeconds) {
7676
synchronized(this.monitor) {
7777
if(this.shutdown) {
78-
throw new IllegalStateException("HeartbeatSender is shutdown." +
79-
" Cannot set new interval.");
78+
return;
8079
}
8180

8281
// cancel any existing heartbeat task

0 commit comments

Comments
 (0)