Improve basic long poll protocol