From b7e7474a5ecf99c72cbf4da16bcda4e88628574d Mon Sep 17 00:00:00 2001 From: Corey Hulen Date: Fri, 1 Jul 2016 11:57:17 -0800 Subject: Fixing invalid session (#3463) --- api/context.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/api/context.go b/api/context.go index fd8a0da7e..1c0dae299 100644 --- a/api/context.go +++ b/api/context.go @@ -279,8 +279,14 @@ func (c *Context) LogAuditWithUserId(userId, extraInfo string) { } func (c *Context) LogError(err *model.AppError) { - l4g.Error(utils.T("api.context.log.error"), c.Path, err.Where, err.StatusCode, - c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.T), err.DetailedError) + + // filter out endless reconnects + if c.Path == "/api/v3/users/websocket" && err.StatusCode == 401 { + c.LogDebug(err) + } else { + l4g.Error(utils.T("api.context.log.error"), c.Path, err.Where, err.StatusCode, + c.RequestId, c.Session.UserId, c.IpAddress, err.SystemMessage(utils.T), err.DetailedError) + } } func (c *Context) LogDebug(err *model.AppError) { -- cgit v1.2.3-1-g7c22