Enable smooth switching between websockets and polling