diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2023-08-07 13:53:43 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-07 13:53:43 -0700 |
commit | 5a9313a13dcf9a7c47f95086e56def99297405f9 (patch) | |
tree | 1ee144e1f60b6064b5e301cba3328ceb7920ad28 /src/main | |
parent | 36d319a81dc3d2c12222cce012c1a1a307a865b2 (diff) | |
parent | 78ead877bac40cd88fc342e966741b42568de5a5 (diff) | |
download | trackermap-server-5a9313a13dcf9a7c47f95086e56def99297405f9.tar.gz trackermap-server-5a9313a13dcf9a7c47f95086e56def99297405f9.tar.bz2 trackermap-server-5a9313a13dcf9a7c47f95086e56def99297405f9.zip |
Merge pull request #5153 from RodolfoSilva/hotfix/auto-close-connection
fix: AMQP auto close connection
Diffstat (limited to 'src/main')
-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) { |