Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(visor.summary): data race condition #1002

Merged
merged 1 commit into from
Nov 15, 2021

Conversation

ppcamp
Copy link
Contributor

@ppcamp ppcamp commented Nov 14, 2021

Did you run make format && make check? Yes, the make check accused 4 errors (G307, time-naming) in the files: pkg/util/rename/rename.go, pkg/transport/network/stcp/pktable.go, pkg/restart/restart_test.go). However, since the code is already using this workaround, I didn't change it.

Fixes #998

Changes:

  • It adds a wg variable inside the Visor struct to force the (*Visor).Summary await until NewVisor finish.

How to test this PR:

  1. Clone this repository
  2. In the same folder, clone the repository skywire-services
  3. Run the interactive environment

This commit adds a waitgroup (producer-consumer) and force the summary to await until NewVisor
finish.

fix skycoin#998
@jdknives jdknives merged commit 08e379b into skycoin:develop Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants