I glanced at the socket.io documentation and found what I needed to make the connection automatically reconnect after a disconnection. You should see messages in the Console at the bottom of the screen informing you of the progress of the reconnect attempts.
Let me know if the new code works for you. Maybe this refresh will be your last
Seems to have worked. A+ cap'n.