Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit90f619d

Browse files
committed
fixup
1 parent91f8009 commit90f619d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

‎vpn/tunnel.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -607,24 +607,24 @@ func (u *updater) netStatusLoop() {
607607
case<-u.ctx.Done():
608608
return
609609
case<-ticker.C:
610-
u.recordLatency()
610+
u.recordLatencies()
611611
u.sendAgentUpdate()
612612
}
613613
}
614614
}
615615

616-
func (u*updater)recordLatency() {
616+
func (u*updater)recordLatencies() {
617617
varagentsIDsToPing []uuid.UUID
618618
u.mu.Lock()
619619
for_,agent:=rangeu.agents {
620620
agentsIDsToPing=append(agentsIDsToPing,agent.ID)
621621
}
622622
u.mu.Unlock()
623623

624-
pingCtx,cancelFunc:=context.WithTimeout(u.ctx,5*time.Second)
625-
defercancelFunc()
626624
for_,agentID:=rangeagentsIDsToPing {
627625
gofunc() {
626+
pingCtx,cancelFunc:=context.WithTimeout(u.ctx,5*time.Second)
627+
defercancelFunc()
628628
pingDur,didP2p,pingResult,err:=u.conn.Ping(pingCtx,agentID)
629629
iferr!=nil {
630630
u.logger.Warn(u.ctx,"failed to ping agent",slog.F("agent_id",agentID),slog.Error(err))

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp