In the code example, remove the call to connectWebSocket since this isn't used anymore.