diff options
author | Corey Hulen <corey@hulen.com> | 2016-07-01 11:57:17 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-01 11:57:17 -0800 |
commit | b7e7474a5ecf99c72cbf4da16bcda4e88628574d (patch) | |
tree | 470249003495aba1da5b7aa0b7d1bbf5a518fe08 /api/context.go | |
parent | 69ea1d71938940e1b680e39594d0968481ffaf57 (diff) | |
download | chat-b7e7474a5ecf99c72cbf4da16bcda4e88628574d.tar.gz chat-b7e7474a5ecf99c72cbf4da16bcda4e88628574d.tar.bz2 chat-b7e7474a5ecf99c72cbf4da16bcda4e88628574d.zip |
Fixing invalid session (#3463)
Diffstat (limited to 'api/context.go')
-rw-r--r-- | api/context.go | 10 |
1 files 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) { |