Fix ECONNRESET when browser refreshed manually

Refreshing the browser caused by node process to crash, since no erro handler was set on the socket.