refactor: less ack noise
This commit is contained in:
parent
b08fc24c5f
commit
10a679bea4
|
@ -6,7 +6,10 @@ export default (socket) => async (packet, fn) => {
|
|||
const Packet = packet.constructor;
|
||||
try {
|
||||
await Packet.validate(packet, socket);
|
||||
fn(undefined, await Packet.respond(packet, socket));
|
||||
const response = await Packet.respond(packet, socket);
|
||||
if ('undefined' !== typeof response) {
|
||||
fn(undefined, response);
|
||||
}
|
||||
}
|
||||
catch (error) {
|
||||
if (error.payload) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user