summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Borg <jakob@kastelo.net>2022-05-04 18:16:36 +0200
committerJakob Borg <jakob@kastelo.net>2022-05-04 18:17:03 +0200
commit2145b3701d6f4f615e55e87374e13b9a12077a74 (patch)
tree187c43952b6025a3d4b538c0988ef4ca9a4264fa
parent4031568cdf462df24977427935e029a4d337be36 (diff)
lib/connections: Correct race on loop variable (fixes #8320) (#8321)v1.20.1
-rw-r--r--lib/connections/service.go2
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()