Skip to content

Commit

Permalink
reset loginPromise in case of error during login
Browse files Browse the repository at this point in the history
  • Loading branch information
hubermat committed Nov 18, 2022
1 parent 5b492d6 commit e64476a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ctldap.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,12 @@ function apiLogin(site) {
site.loginPromise = null;
// end gracefully
return null;
}).catch(function (error) {
logDebug(site, "CT API login failed with exception.");
// clear login promise
site.loginPromise = null;
// rethrow error
throw error;
});
} else if (config.debug) {
logDebug(site, "Return pending login promise");
Expand Down

0 comments on commit e64476a

Please sign in to comment.