Skip to content

Commit

Permalink
Removed an assertion that made the closing of an experiment fail alth…
Browse files Browse the repository at this point in the history
…ough it wasn't necessary.
  • Loading branch information
MichaelRoeder committed Jan 5, 2024
1 parent ea0da3a commit 223f671
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,12 @@ public void setExpRabbitMQConnector(RabbitMQConnector rabbitMQConnector) {
*/
public void closeExpRabbitMQConnector() {
LOGGER.info("Closing experiment's RabbitMQ connector for the command queue: {}", rabbitMQConnector);
assert rabbitMQConnector != null : "RabbitMQ connector shouldn't be null";
IOUtils.closeQuietly(rabbitMQConnector);
rabbitMQConnector = null;
if(rabbitMQConnector != null) {
IOUtils.closeQuietly(rabbitMQConnector);
rabbitMQConnector = null;
} else {
LOGGER.warn("Got a request to close the RabbitMQ connector but it was already null.");
}
}

/**
Expand Down

0 comments on commit 223f671

Please sign in to comment.