diff options
author | =Corey Hulen <corey@hulen.com> | 2015-07-21 12:26:27 -0800 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-07-21 12:26:27 -0800 |
commit | 848eeeeef4ed277ceb00d3fc6c8a0303c0e72d09 (patch) | |
tree | 98390442e8052b8e02469e5ccf7596e22b7ea07f /api/web_team_hub.go | |
parent | e87adce4a059b97a65198b326be6304abdf4e657 (diff) | |
parent | bee26e3f2654ce7acce647818847480569236343 (diff) | |
download | chat-848eeeeef4ed277ceb00d3fc6c8a0303c0e72d09.tar.gz chat-848eeeeef4ed277ceb00d3fc6c8a0303c0e72d09.tar.bz2 chat-848eeeeef4ed277ceb00d3fc6c8a0303c0e72d09.zip |
fixing merge conflicts
Diffstat (limited to 'api/web_team_hub.go')
-rw-r--r-- | api/web_team_hub.go | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/api/web_team_hub.go b/api/web_team_hub.go index 7c7981e76..7a63b84d1 100644 --- a/api/web_team_hub.go +++ b/api/web_team_hub.go @@ -6,8 +6,6 @@ package api import ( l4g "code.google.com/p/log4go" "github.com/mattermost/platform/model" - "github.com/mattermost/platform/store" - "strings" ) type TeamHub struct { @@ -43,43 +41,6 @@ func (h *TeamHub) Stop() { } func (h *TeamHub) Start() { - - pubsub := store.RedisClient().PubSub() - - go func() { - defer func() { - l4g.Debug("redis reader finished for teamId=%v", h.teamId) - hub.Stop(h.teamId) - }() - - l4g.Debug("redis reader starting for teamId=%v", h.teamId) - - err := pubsub.Subscribe(h.teamId) - if err != nil { - l4g.Error("Error while subscribing to redis %v %v", h.teamId, err) - return - } - - for { - if payload, err := pubsub.ReceiveTimeout(REDIS_WAIT); err != nil { - if strings.Contains(err.Error(), "i/o timeout") { - if len(h.connections) == 0 { - l4g.Debug("No active connections so sending stop %v", h.teamId) - return - } - } else { - return - } - } else { - msg := store.GetMessageFromPayload(payload) - if msg != nil { - h.broadcast <- msg - } - } - } - - }() - go func() { for { select { @@ -110,7 +71,6 @@ func (h *TeamHub) Start() { webCon.WebSocket.Close() } - pubsub.Close() return } } |