Skip to content

Fix default role manager concurrency#74

Merged
hsluoyz merged 1 commit intoapache:masterfrom
matevzmihalic:fix/rbac-concurrency
Feb 26, 2018
Merged

Fix default role manager concurrency#74
hsluoyz merged 1 commit intoapache:masterfrom
matevzmihalic:fix/rbac-concurrency

Conversation

@matevzmihalic
Copy link
Contributor

Default role manager used a map which isn't thread safe. This caused fatal error: concurrent map writes when two goroutines tried to write to map.

I replaced map with sync.Map which is thread safe.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.02%) to 84.044% when pulling 3754dbd on matevzmihalic:fix/rbac-concurrency into d466314 on casbin:master.

@hsluoyz hsluoyz merged commit cef59c8 into apache:master Feb 26, 2018
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.

3 participants