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

j-c-levin/gdevelop-multiplayer-sample: Server/main/main.go; 7 LoC #18

Open
githubvet opened this issue Nov 19, 2020 · 0 comments
Open

Comments

@githubvet
Copy link

Found a possible issue in j-c-levin/gdevelop-multiplayer-sample at Server/main/main.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 7 line(s) of Go which triggered the analyzer.
	for i, msg := range playerMap {
		go func() {
			// Mimic lag, sleep the code for 'lag' milliseconds
			time.Sleep(time.Duration(lag) * time.Millisecond)
			m.Broadcast(msg)
		}()
		delete(playerMap,i)
	}

commit ID: 6189d9a5d1c84725e22e2e29cede0f45e07a2bb9

@githubvet githubvet added the tiny less than 10 lines of code label Nov 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant