go-syslog icon indicating copy to clipboard operation
go-syslog copied to clipboard

Data race on currentid

Open AlekSi opened this issue 4 years ago • 1 comments

https://github.com/influxdata/go-syslog/blob/ac565dc76ba6bb17b47140fb74355d1de7f19307/rfc5424/builder.go#L64-L65

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.

AlekSi avatar Oct 07 '21 09:10 AlekSi

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!

leodido avatar Feb 24 '22 22:02 leodido