billroy/socket.io-arduino-client — pull request #5 by jacobrosenthal (2014-04-21 19:46:59+00:00)
Title: no reason to terminate connection before upgrade request

I used your code to get familiar with sockets (thanks!) and realized one thing while working with it and wanted to give it back. Your disconnect and reconnect is superfluous. Try it on your setup.