Skip to content

Commit

Permalink
fixed to catch errors when servient termination fails
Browse files Browse the repository at this point in the history
  • Loading branch information
hidetak committed Mar 4, 2024
1 parent a85fbbc commit 5d61095
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion node-red-node-wot/src/servients/servient-manager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,11 @@ export default class ServientManager {
console.warn("[warn] timeout happend while servient ending. id: " + id)
resolve()
}, 10000) // If it does not end after 10 seconds, it is considered to be finished.
await servientWrapper.endServient()
try {
await servientWrapper.endServient()
} catch (err) {
reject(err)
}
console.debug("[debug] servient ended. id: " + id)
clearTimeout(timeoutId)
resolve()
Expand Down

0 comments on commit 5d61095

Please sign in to comment.