Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Clear all the futures when sync is called. #501

Merged
merged 12 commits into from
Feb 27, 2020
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,11 @@ public boolean isConnected() {
public void sync() {
// Wait for some time for futures to complete
// TODO: should this be configurable?
LettuceFutures.awaitAll(60, TimeUnit.SECONDS, futures.toArray(new RedisFuture[0]));
futures.clear();
try {
LettuceFutures.awaitAll(60, TimeUnit.SECONDS, futures.toArray(new RedisFuture[0]));
woop marked this conversation as resolved.
Show resolved Hide resolved
} finally {
futures.clear();
woop marked this conversation as resolved.
Show resolved Hide resolved
}
}

@Override
Expand Down