From f0799e255a582a61ca9de1eb715af8b9849cc81a Mon Sep 17 00:00:00 2001 From: Rodolfo Silva Date: Mon, 7 Aug 2023 10:50:32 -0300 Subject: fix: remove AMQP auto close connection --- src/main/java/org/traccar/forward/AmqpClient.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/forward/AmqpClient.java b/src/main/java/org/traccar/forward/AmqpClient.java index 302aa664c..361cfffee 100644 --- a/src/main/java/org/traccar/forward/AmqpClient.java +++ b/src/main/java/org/traccar/forward/AmqpClient.java @@ -43,7 +43,8 @@ public class AmqpClient { throw new RuntimeException("Error while setting URI for RabbitMQ connection factory", e); } - try (Connection connection = factory.newConnection()) { + try { + Connection connection = factory.newConnection(); channel = connection.createChannel(); channel.exchangeDeclare(exchange, BuiltinExchangeType.TOPIC, true); } catch (IOException | TimeoutException e) { -- cgit v1.2.3