Skip to content

Commit

Permalink
fix wrong return in handleDisconnect (#281)
Browse files Browse the repository at this point in the history
  • Loading branch information
JannikStreek authored May 30, 2024
1 parent 5589524 commit 4950221
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion teammapper-backend/src/map/controllers/maps.gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export class MapsGateway implements OnGatewayDisconnect {
@SubscribeMessage('leave')
async handleDisconnect(client: Socket) {
const mapId: string | undefined = await this.cacheManager.get(client.id)
if(!mapId) return Promise.reject()
if(!mapId) return

this.server.to(mapId).emit('clientDisconnect', client.id)
this.removeClientForMap(mapId, client.id)
Expand Down

0 comments on commit 4950221

Please sign in to comment.