Bit of clean-up, need to fix busy-waiting
This commit is contained in:
@@ -61,12 +61,8 @@ public class Main {
|
||||
System.err.println("Failed to connect to RabbitMQ: " + e.getMessage());
|
||||
System.err.println("Retrying in 5 seconds...");
|
||||
try {
|
||||
if (connection != null && connection.isOpen()) {
|
||||
connection.close();
|
||||
}
|
||||
if (channel != null && channel.isOpen()) {
|
||||
channel.close();
|
||||
}
|
||||
if (connection != null && connection.isOpen()) connection.close();
|
||||
if (channel != null && channel.isOpen()) channel.close();
|
||||
} catch (IOException | TimeoutException ignored) {
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user