summaryrefslogtreecommitdiffstats
path: root/app/web_conn.go
diff options
context:
space:
mode:
authorCorey Hulen <corey@hulen.com>2017-06-29 14:11:20 -0700
committerGitHub <noreply@github.com>2017-06-29 14:11:20 -0700
commita4f363a50b7807de9ac086ee0e62442a7645f5e8 (patch)
tree8ea94c8e5d49dc87051443e83fee03448cf4aa2c /app/web_conn.go
parentf79101a279596566d6ee7076d9c8adbc259d97ed (diff)
downloadchat-a4f363a50b7807de9ac086ee0e62442a7645f5e8.tar.gz
chat-a4f363a50b7807de9ac086ee0e62442a7645f5e8.tar.bz2
chat-a4f363a50b7807de9ac086ee0e62442a7645f5e8.zip
PLT-6610 adding the view channel event as skippable (#6800)
Diffstat (limited to 'app/web_conn.go')
-rw-r--r--app/web_conn.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/web_conn.go b/app/web_conn.go
index 1cab36a2a..43047a881 100644
--- a/app/web_conn.go
+++ b/app/web_conn.go
@@ -116,7 +116,9 @@ func (c *WebConn) WritePump() {
skipSend := false
if len(c.Send) >= SEND_SLOW_WARN {
// When the pump starts to get slow we'll drop non-critical messages
- if msg.EventType() == model.WEBSOCKET_EVENT_TYPING || msg.EventType() == model.WEBSOCKET_EVENT_STATUS_CHANGE {
+ if msg.EventType() == model.WEBSOCKET_EVENT_TYPING ||
+ msg.EventType() == model.WEBSOCKET_EVENT_STATUS_CHANGE ||
+ msg.EventType() == model.WEBSOCKET_EVENT_CHANNEL_VIEWED {
l4g.Info(fmt.Sprintf("websocket.slow: dropping message userId=%v type=%v channelId=%v", c.UserId, msg.EventType(), evt.Broadcast.ChannelId))
skipSend = true
}