Skip to content

Commit

Permalink
lib/connections: Correct race on loop variable (fixes syncthing#8320) (
Browse files Browse the repository at this point in the history
  • Loading branch information
calmh committed May 4, 2022
1 parent 4031568 commit 2145b37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/connections/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 2145b37

Please sign in to comment.