I meant to move this `shuttingDown=false` from here to `kill` so that this flag is only set/read from this function.