Explorar el Código

import updater effeciency

Darien Raymond hace 8 años
padre
commit
f87b0fcde7
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      transport/internet/kcp/connection.go

+ 2 - 1
transport/internet/kcp/connection.go

@@ -147,9 +147,10 @@ func (v *Updater) Run() {
 		if v.shouldTerminate() {
 			return
 		}
+		interval := v.Interval()
 		for v.shouldContinue() {
 			v.updateFunc()
-			time.Sleep(v.Interval())
+			time.Sleep(interval)
 		}
 	}
 }