fallback to xhr polling if can't connect using websocket more than 1 second.