Rather than kludging up a (bad) guess at the host and deleting it manually, just pass in the 'force new connection' option, which forces socket.io to refresh the socket.