sleep should use setTimeout not setInterval, leading to a memory/resource leak
async and for-each don't work together. While the program appeared to function as intended, all documentation (and IDE advice) seems to indicate this is not reliable as nothing is awaiting the top-level promise.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.