I have a node js script with an async main method. Sometimes the script terminates fine, other times it hangs.
const main = async () => {
let updates = []
// ... add a bunch of promises to updates
await Promise.all(updates)
}
main()
Does anyone know why this script sometimes might hang? It just doesn't terminate though it appears to have run to completion.