Browse Source

lib/connections: Correct race on loop variable (fixes #8320) (#8321)

Jakob Borg 3 years ago
parent
commit
ce0ded7c78
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/connections/service.go

+ 1 - 1
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()