Stop WebSockets from thawing the topic list.

This commit is contained in:
Azareal 2019-04-20 09:15:17 +10:00
parent c84b0aa433
commit 0ff582c5b9
1 changed files with 5 additions and 0 deletions

View File

@ -73,6 +73,11 @@ func (hub *WsHubImpl) Tick() error {
}
func wsTopicListTick(hub *WsHubImpl) error {
// Avoid hitting GetList when the topic list hasn't changed
if !TopicListThaw.Thawed() && hub.lastTopicList != nil {
return nil
}
// Don't waste CPU time if nothing has happened
// TODO: Get a topic list method which strips stickies?
tList, _, _, err := TopicList.GetList(1, "", nil)