浏览代码

Merge pull request #133 from slackhq/interval_zero_check

if interval is 0 don't even update lh (mobile use case)
Ryan Huber 5 年之前
父节点
当前提交
fd8ad5d0d7
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      lighthouse.go

+ 1 - 1
lighthouse.go

@@ -197,7 +197,7 @@ func NewIpAndPortsFromNetIps(ips []udpAddr) *[]*IpAndPort {
 }
 
 func (lh *LightHouse) LhUpdateWorker(f EncWriter) {
-	if lh.amLighthouse {
+	if lh.amLighthouse || lh.interval == 0 {
 		return
 	}