maxogden/multiplex — pull request #12 by substack (2014-10-08 06:52:41+00:00)
Title: else if to avoid push after eof errors

I was getting a lot of errors like this:

```
Error: stream.push() after EOF
at readableAddChunk (/home/substack/projects/hash-exchange/node_modules/multiplex/node_modules/through2/node_modules/readable-stream/lib/_stream_readable.js:168:15)
```

because line 86 was ending a stream right before pushing data to it:

``` js
if (chunk.length === 0) return self.streams[id].end()
dataVal === type && self.streams[id].push(chunk)
```

This patch just puts that case in an `else if` to avoid that case. I couldn't get an isolated test case easily working but that would be good longer term to have.