From 7e44c96bd66390bc05c8bb8a9aae589b384a81e9 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Wed, 30 Jan 2019 17:09:52 +0000 Subject: [PATCH] Fixes stack overflow at connection chat hub (+no comment/shameonme). --- src/Yavsc/Hubs/ChatHub.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/Yavsc/Hubs/ChatHub.cs b/src/Yavsc/Hubs/ChatHub.cs index fa08ace6..fcbf07ba 100644 --- a/src/Yavsc/Hubs/ChatHub.cs +++ b/src/Yavsc/Hubs/ChatHub.cs @@ -60,7 +60,6 @@ namespace Yavsc await Groups.Add(Context.ConnectionId, group); if (isAuth) { - /* var user = _dbContext.Users.Include(u=>u.Connections).Single(u => u.UserName == userName); if (user.Connections==null) user.Connections = new List(); @@ -78,14 +77,14 @@ namespace Yavsc _dbContext.SaveChanges(); Clients.CallerState.BlackListedBy = await _dbContext.BlackListed.Where(r=>r.UserId == user.Id).Select(r=>r.OwnerId).ToArrayAsync(); - */ + } } else await Groups.Add(Context.ConnectionId, "anonymous"); Clients.Group("authenticated").notify("connected", Context.ConnectionId, userName); - await OnConnected(); + await base.OnConnected(); } public override Task OnDisconnected(bool stopCalled)