aboutsummaryrefslogtreecommitdiff
path: root/src/main/java
diff options
context:
space:
mode:
authorRodolfo Silva <contato@rodolfosilva.com>2023-08-07 10:50:32 -0300
committerRodolfo Silva <contato@rodolfosilva.com>2023-08-07 10:50:32 -0300
commitf0799e255a582a61ca9de1eb715af8b9849cc81a (patch)
tree1ee144e1f60b6064b5e301cba3328ceb7920ad28 /src/main/java
parent36d319a81dc3d2c12222cce012c1a1a307a865b2 (diff)
downloadtrackermap-server-f0799e255a582a61ca9de1eb715af8b9849cc81a.tar.gz
trackermap-server-f0799e255a582a61ca9de1eb715af8b9849cc81a.tar.bz2
trackermap-server-f0799e255a582a61ca9de1eb715af8b9849cc81a.zip
fix: remove AMQP auto close connection
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/org/traccar/forward/AmqpClient.java3
1 files changed, 2 insertions, 1 deletions
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) {