socketstream/ss-console — pull request #4 by rngadam (2012-11-15 10:19:35+00:00)
Title: catch socket error (such as ECONNRESET)

This prevents the socket from throwing an exception taking the whole application with it.

This is easily tested by running an SS app with ss-console started and running nmap (does half-socket opens).

So...

```
nmap localhost
```
will result in:

```
Aug 07 02:54:25 lophilo node[571]: → Session ID Xv9W2t/PdGQ/cUDRHKf6ANxq - Console client has connected
Aug 07 02:54:25 lophilo node[571]: events.js:68
Aug 07 02:54:25 lophilo node[571]: throw arguments[1]; // Unhandled 'error' event
Aug 07 02:54:25 lophilo node[571]: ^
Aug 07 02:54:25 lophilo node[571]: Error: write ECONNRESET
```
...whereas the node exits.