mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-08 20:29:05 +00:00
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:
committed by
GitHub
parent
7e9fc4aa97
commit
f0bb50b61a
@@ -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`);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user