mattrobenolt/node — comment on commit 5f822fbd0e4e1dcb33c9e04c1581ebe2211fb7ad
File: lib/zlib.js line 105
By isaacs:

The correct way to do this is to have a single named function, that you trap a reference to, not an anonymous function. Something like this:

```javascript
function onFinish(err) {
unzip.removeListener('end', onFinish);
unzip.removeListener('error', onFinish);
callback(err);
}

unzip.on('error', onFinish);
unzip.on('end', onFinish);
```