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

This commit is contained in:
Jakob Borg 2022-05-04 18:16:36 +02:00 committed by GitHub
parent 31a78592e8
commit ce0ded7c78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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()