diff options
author | Rodolfo Silva <contato@rodolfosilva.com> | 2023-08-07 10:50:32 -0300 |
---|---|---|
committer | Rodolfo Silva <contato@rodolfosilva.com> | 2023-08-07 10:50:32 -0300 |
commit | f0799e255a582a61ca9de1eb715af8b9849cc81a (patch) | |
tree | 1ee144e1f60b6064b5e301cba3328ceb7920ad28 /src | |
parent | 36d319a81dc3d2c12222cce012c1a1a307a865b2 (diff) | |
download | trackermap-server-f0799e255a582a61ca9de1eb715af8b9849cc81a.tar.gz trackermap-server-f0799e255a582a61ca9de1eb715af8b9849cc81a.tar.bz2 trackermap-server-f0799e255a582a61ca9de1eb715af8b9849cc81a.zip |
fix: remove AMQP auto close connection
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/forward/AmqpClient.java | 3 |
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) { |