fix: reify server packets

This commit is contained in:
cha0s 2019-04-25 03:43:13 -05:00
parent 4c8ed08099
commit 8d2a323d90

View File

@ -48,8 +48,8 @@ class ServerSocket extends decorateSocket(class {}) {
this.socket = socket;
for (const Packet of allPackets()) {
const id = idFromPacket(Packet);
this.socket.on(id, (packet) => {
this.emit('packet', packet);
this.socket.on(id, (data) => {
this.emit('packet', new Packet(data));
});
}
this.socket.on('disconnect', (...args) => {