fix: reify server packets
This commit is contained in:
parent
4c8ed08099
commit
8d2a323d90
|
@ -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) => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user