diff options
author | Jakob Borg <jakob@kastelo.net> | 2022-05-04 18:16:36 +0200 |
---|---|---|
committer | Jakob Borg <jakob@kastelo.net> | 2022-05-04 18:17:03 +0200 |
commit | 2145b3701d6f4f615e55e87374e13b9a12077a74 (patch) | |
tree | 187c43952b6025a3d4b538c0988ef4ca9a4264fa | |
parent | 4031568cdf462df24977427935e029a4d337be36 (diff) |
lib/connections: Correct race on loop variable (fixes #8320) (#8321)v1.20.1
-rw-r--r-- | lib/connections/service.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connections/service.go b/lib/connections/service.go index 1404b96352..ace5dd0c40 100644 --- a/lib/connections/service.go +++ b/lib/connections/service.go @@ -228,8 +228,8 @@ func NewService(cfg config.Wrapper, myID protocol.DeviceID, mdl Model, tlsCfg *t } func (s *service) handleConns(ctx context.Context) error { - var c internalConn for { + var c internalConn select { case <-ctx.Done(): return ctx.Err() |