fix raw event (#2074)

This commit is contained in:
Gus Caplan
2017-10-28 11:58:46 -05:00
committed by Crawl
parent b255af0825
commit c495ea025a

View File

@@ -272,7 +272,7 @@ class WebSocketConnection extends EventEmitter {
try {
const packet = WebSocket.unpack(this.inflate.result);
this.onPacket(packet);
if (this.client.listenerCount('raw')) this.client.emit('raw', data);
if (this.client.listenerCount('raw')) this.client.emit('raw', packet);
} catch (err) {
this.client.emit('debug', err);
}