Skip to content

prevent double callback in case of error#112

Open
mvayngrib wants to merge 1 commit intoConsensys:masterfrom
mvayngrib:doublecallbackfix
Open

prevent double callback in case of error#112
mvayngrib wants to merge 1 commit intoConsensys:masterfrom
mvayngrib:doublecallbackfix

Conversation

@mvayngrib
Copy link

the try/catch shouldn't catch errors in the callback function, otherwise weird side effects arise, e.g. if:

ks.deriveKeyFromPassword('badpassword', function badCallback () {
  throw new Error('misbehavin!') // causes badCallback to get called again
})

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant