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

Config mutex locking error #49

Closed
ghost opened this issue Jul 12, 2017 · 1 comment · Fixed by #50
Closed

Config mutex locking error #49

ghost opened this issue Jul 12, 2017 · 1 comment · Fixed by #50

Comments

@ghost
Copy link

ghost commented Jul 12, 2017

Why do you lock mutex for reading in Set... methods?

func (c *Config) SetString(key string, value string) {
	c.mu.RLock()
	{
		c.m[key] = value
	}
	c.mu.RUnlock()
}

is this copypast?

@wyattjoh
Copy link
Contributor

That definitely looks like a bug! Thanks for that catch @finalist736

wyattjoh added a commit that referenced this issue Jul 12, 2017
@wyattjoh wyattjoh mentioned this issue Jul 12, 2017
ardan-bkennedy pushed a commit that referenced this issue Jul 17, 2017
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 a pull request may close this issue.

1 participant