From f87b0fcde7f79c3e0da701222398972fb69997be Mon Sep 17 00:00:00 2001 From: Darien Raymond Date: Sun, 26 Feb 2017 15:01:43 +0100 Subject: [PATCH] import updater effeciency --- transport/internet/kcp/connection.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/transport/internet/kcp/connection.go b/transport/internet/kcp/connection.go index b46ebc92..19b44ca5 100644 --- a/transport/internet/kcp/connection.go +++ b/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) } } }