Skip to content

Commit

Permalink
close redis connection only if connection is open
Browse files Browse the repository at this point in the history
  • Loading branch information
loperd committed Nov 29, 2020
1 parent 0465229 commit 2d44de0
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@ private RedisURI createRedisURI(RedisStorageCredentials credentials) {

@Override
public void shutdown() {
this.connection.close();
if (this.connection.isOpen()) {
this.connection.close();
}

this.resources.shutdown();
this.client.shutdown();
}
Expand Down

0 comments on commit 2d44de0

Please sign in to comment.