handleLongPollingRequest refactor