Skip to content
This repository was archived by the owner on Nov 22, 2020. It is now read-only.
This repository was archived by the owner on Nov 22, 2020. It is now read-only.

bcachain/go-bcachain: go-bcachain/cmd/swarm/swarm-smoke/feed_upload_and_sync.go; 14 LoC #835

Description

@githubvet

Found a possible issue in bcachain/go-bcachain at go-bcachain/cmd/swarm/swarm-smoke/feed_upload_and_sync.go

The below snippet of Go code triggered static analysis which searches for goroutines and/or defer statements
which capture loop variables.

Click here to see the code in its original context.

Click here to show the 15 line(s) of Go which triggered the analyzer.
		for _, hex := range []string{topicHex, subTopicOnlyHex, mergedSubTopicHex} {
			wg.Add(1)
			ruid := uuid.New()[:8]
			go func(hex string, endpoint string, ruid string) {
				for {
					err := fetchFeed(hex, userHex, httpEndpoint(host), dataHash, ruid)
					if err != nil {
						continue
					}

					wg.Done()
					return
				}
			}(hex, httpEndpoint(host), ruid)
		}

commit ID: 7f6052d80c6dec4616afeb79d55fe975d13be7c9

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions