try {
return super.runAndWait(client, subProgress);
}
catch (CoreException ce) {
CloudFoundryLoginHandler handler = new CloudFoundryLoginHandler(client);
if (handler.shouldAttemptClientLogin(ce)) {
int attempts = 3;
handler.login(subProgress, attempts, CloudOperationsConstants.LOGIN_INTERVAL);
return runAndWait(client, subProgress);
}
throw ce;