Skip to content

Commit

Permalink
Adapt to Future#eventually change
Browse files Browse the repository at this point in the history
  • Loading branch information
vietj committed Aug 31, 2023
1 parent a3571b4 commit d55c915
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/vertx/redis/client/impl/BaseRedisClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void close() {
.compose(conn ->
conn.send(request)
// regardless of the result, return the connection to the pool
.eventually(e ->
.eventually(() ->
conn.close()
.onFailure(LOG::warn)));
}
Expand All @@ -66,7 +66,7 @@ public void close() {
.compose(conn ->
conn.batch(requests)
// regardless of the result, return the connection to the pool
.eventually(e ->
.eventually(() ->
conn.close().onFailure(LOG::warn)));
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ private void isSentinelOk(String endpoint, RedisConnectOptions argument, Handler
.send(cmd(PING))
.onFailure(err -> handler.handle(Future.failedFuture(err)))
.onSuccess(ok -> handler.handle(Future.succeededFuture(uri)))
.eventually(v -> conn.close().onFailure(LOG::warn));
.eventually(() -> conn.close().onFailure(LOG::warn));
});
}

Expand All @@ -235,7 +235,7 @@ private void getMasterFromEndpoint(String endpoint, RedisSentinelConnectOptions
handler.handle(Future.succeededFuture(new RedisURI(uri, rHost.contains(":") ? "[" + rHost + "]" : rHost, rPort)));
}
})
.eventually(v -> conn.close().onFailure(LOG::warn));
.eventually(() -> conn.close().onFailure(LOG::warn));
});
}

Expand Down Expand Up @@ -281,7 +281,7 @@ private void getReplicaFromEndpoint(String endpoint, RedisSentinelConnectOptions
}
}
})
.eventually(v -> conn.close().onFailure(LOG::warn));
.eventually(() -> conn.close().onFailure(LOG::warn));
});
}

Expand Down

0 comments on commit d55c915

Please sign in to comment.