Skip to content

Commit a129316

Browse files
Guard Thread#setName here, too
1 parent 0122af3 commit a129316

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -670,8 +670,10 @@ public void handleConnectionClose(Command closeCommand) {
670670
_brokerInitiatedShutdown = true;
671671
SocketCloseWait scw = new SocketCloseWait(sse);
672672
Thread waiter = threadFactory.newThread(scw);
673-
waiter.setName("AMQP Connection Closing Monitor " +
674-
getHostAddress() + ":" + getPort());
673+
if(Environment.isAllowedToModifyThreads()) {
674+
waiter.setName("AMQP Connection Closing Monitor " +
675+
getHostAddress() + ":" + getPort());
676+
}
675677
waiter.start();
676678
}
677679

0 commit comments

Comments
 (0)