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() { get next() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const cleanup = () => { const cleanup = () => {
this.removeListener(onMessage); this.removeListener('message', onMessage);
this.removeListener(onEnd); this.removeListener('end', onEnd);
}; };
const onMessage = (...args) => { const onMessage = (...args) => {