Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Data race on currentid #44

Open
AlekSi opened this issue Oct 7, 2021 · 1 comment
Open

Data race on currentid #44

AlekSi opened this issue Oct 7, 2021 · 1 comment

Comments

@AlekSi
Copy link

AlekSi commented Oct 7, 2021

var currentid string
var currentparamname string

Those two variables are defined on the package level. That means that two independent rfc5424.SyslogMessage objects with structured data can't be built concurrently – race detector correctly reports unsynchronised writes.

@leodido
Copy link
Collaborator

leodido commented Feb 24, 2022

You're right, thanks for spotting it!

The fix is not that difficult but I don't have any spare time to do it. Would love to review a PR, tho!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants