fix(server,cli): don't float promises (#4433)

* fix: don't allow floating promises

* fix: await all promises

* fix: download archives

* fix cli tests

* fix: skip web
This commit is contained in:
Jonathan Jogenfors
2023-10-13 07:22:40 +02:00
committed by GitHub
parent 7e9fc4aa97
commit f0bb50b61a
13 changed files with 41 additions and 43 deletions

View File

@@ -16,7 +16,7 @@ export class CommunicationRepository implements OnGatewayConnection, OnGatewayDi
this.logger.log(`New websocket connection: ${client.id}`);
const user = await this.authService.validate(client.request.headers, {});
if (user) {
client.join(user.id);
await client.join(user.id);
this.send(CommunicationEvent.SERVER_VERSION, user.id, serverVersion);
} else {
client.emit('error', 'unauthorized');
@@ -28,8 +28,8 @@ export class CommunicationRepository implements OnGatewayConnection, OnGatewayDi
}
}
handleDisconnect(client: Socket) {
client.leave(client.nsp.name);
async handleDisconnect(client: Socket) {
await client.leave(client.nsp.name);
this.logger.log(`Client ${client.id} disconnected from Websocket`);
}