aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/org/traccar/forward
diff options
context:
space:
mode:
authorRodolfo Silva <contato@rodolfosilva.com>2023-08-07 16:47:56 -0300
committerRodolfo Silva <contato@rodolfosilva.com>2023-08-07 16:47:56 -0300
commit78ead877bac40cd88fc342e966741b42568de5a5 (patch)
tree1ee144e1f60b6064b5e301cba3328ceb7920ad28 /src/main/java/org/traccar/forward
parentac2ca17894da7fd43432c63056f6abef4a7a611b (diff)
downloadtrackermap-server-78ead877bac40cd88fc342e966741b42568de5a5.tar.gz
trackermap-server-78ead877bac40cd88fc342e966741b42568de5a5.tar.bz2
trackermap-server-78ead877bac40cd88fc342e966741b42568de5a5.zip
fix: remove the AmqpClient shutdown hook
Diffstat (limited to 'src/main/java/org/traccar/forward')
-rw-r--r--src/main/java/org/traccar/forward/AmqpClient.java7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/main/java/org/traccar/forward/AmqpClient.java b/src/main/java/org/traccar/forward/AmqpClient.java
index 8ac618f5c..361cfffee 100644
--- a/src/main/java/org/traccar/forward/AmqpClient.java
+++ b/src/main/java/org/traccar/forward/AmqpClient.java
@@ -47,13 +47,6 @@ public class AmqpClient {
Connection connection = factory.newConnection();
channel = connection.createChannel();
channel.exchangeDeclare(exchange, BuiltinExchangeType.TOPIC, true);
- Runtime.getRuntime().addShutdownHook(new Thread(() -> {
- try {
- connection.close();
- } catch (IOException e) {
- throw new RuntimeException(e);
- }
- }));
} catch (IOException | TimeoutException e) {
throw new RuntimeException("Error while creating and configuring RabbitMQ channel", e);
}