bug fixes

This commit is contained in:
Michele Scandura 2020-12-08 16:34:02 +00:00
parent 2a796509c8
commit 1759f7cd8e
12 changed files with 151 additions and 48 deletions

View file

@ -142,7 +142,8 @@ namespace Sledgemapper.Api.Hubs
foreach (var userSession in userSessions)
{
var session = _dbContext.Sessions.FirstOrDefault(m => m.SessionId == userSession.SessionId);
await Clients.Group(session.SessionName).PlayerUpdate(null); //send remove player
await Clients.Group(session.SessionName).RemovePlayer(new Player{UserId=userId}); //send remove player
_dbContext.SessionUsers.Remove(userSession);
}
}