Skip to content
This repository has been archived by the owner on Jul 21, 2023. It is now read-only.

Commit

Permalink
fix: ensure Promise rejections are handled
Browse files Browse the repository at this point in the history
  • Loading branch information
dirkmc committed Mar 17, 2019
1 parent 9059b61 commit 679d71c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/private.js
Original file line number Diff line number Diff line change
Expand Up @@ -272,16 +272,16 @@ module.exports = (dht) => ({
// correct ourself
if (dht._isSelf(v.from)) {
try {
return dht._putLocal(key, fixupRec)
await dht._putLocal(key, fixupRec)
} catch (err) {
dht._log.error('Failed error correcting self', err)
return
}
return
}

// send correction
try {
return dht._putValueToPeer(key, fixupRec, v.from)
await dht._putValueToPeer(key, fixupRec, v.from)
} catch (err) {
dht._log.error('Failed error correcting entry', err)
}
Expand Down

0 comments on commit 679d71c

Please sign in to comment.