Updated the calls to the socket connection