Description
Once all the promises are done at the end it calls itself, but it has a depth param which isn't provided there... should it be? Either way, if you manage to get it into a state where there's no HS connection and it thinks it needs more history, it will just keep trying.
This smells like a bug with the recent TS conversion but I can't see exactly how it would have regressed.