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

REM3-315 ConnectionInfo.MaybeShared#getConnection returns a non-compl… #158

Merged
merged 1 commit into from Oct 17, 2017
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -86,10 +86,20 @@ void connectionClosed(AuthenticationConfiguration authenticationConfiguration, f
splice(futureResult, attempt, authenticationConfiguration);
attempt.addNotifier(new IoFuture.HandlingNotifier<Connection, Void>() {
public void handleCancelled(final Void attachment) {
synchronized (maybeShared.pendingAttempts) {
for (Map.Entry<AuthenticationConfiguration, FutureResult<Connection>> pendingAttempt : maybeShared.pendingAttempts.entrySet()) {
pendingAttempt.getValue().setCancelled();
}
}
clear();
}

public void handleFailed(final IOException exception, final Void attachment) {
synchronized (maybeShared.pendingAttempts) {
for (Map.Entry<AuthenticationConfiguration, FutureResult<Connection>> pendingAttempt : maybeShared.pendingAttempts.entrySet()) {
pendingAttempt.getValue().setException(exception);
}
}
clear();
}

@@ -165,11 +175,9 @@ boolean connectionClosed(final AuthenticationConfiguration authenticationConfigu
}
assert doConnect;
final IoFuture<Connection> ioFuture = futureResult.getIoFuture();
final AtomicBoolean cancelFlag = new AtomicBoolean();
final FutureResult<Connection> finalFutureResult = futureResult;
futureResult.addCancelHandler(new Cancellable() {
public Cancellable cancel() {
cancelFlag.set(true);
finalFutureResult.setCancelled();
return this;
}
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.