longpolling clean up