Fix removeListener call (#762)

This commit is contained in:
Programmix
2016-10-01 13:22:32 -07:00
committed by Schuyler Cebulskie
parent 34168eb832
commit 1fcc618532

View File

@@ -101,8 +101,8 @@ class MessageCollector extends EventEmitter {
get next() {
return new Promise((resolve, reject) => {
const cleanup = () => {
this.removeListener(onMessage);
this.removeListener(onEnd);
this.removeListener('message', onMessage);
this.removeListener('end', onEnd);
};
const onMessage = (...args) => {