clowwindy/shadowsocks-nodejs — pull request #108 by yorkie (2014-06-12 14:01:18+00:00)
Title: local: refuse remote data after connection disconnected

fix this error:
```
12 Jun 21:33:35 - 549ms TypeError: Cannot call method 'destroy' of null
at Socket. (/usr/local/lib/node_modules/shadowsocks/lib/shadowsocks/local.js:177:31)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket. (_stream_readable.js:745:14)
at Socket.EventEmitter.emit (events.js:92:17)
at emitReadable_ (_stream_readable.js:407:10)
at emitReadable (_stream_readable.js:403:5)
at readableAddChunk (_stream_readable.js:165:9)
at Socket.Readable.push (_stream_readable.js:127:10)
at TCP.onread (net.js:528:21)
```

The reproduce description:

1. `connection` has been emitted at `close`
2. `clean` function is called
3. in this moment, `remote` stream still live, then the `data` event of `remote` might be called.

Such that from step 3, the below error would be created and caught by `try-catch` because `connection` has been set to `null` in `clean` function.