mod_base: fix race conditions in the comet controller.