More work on the longpolling framework