Closed MarcArumi closed 5 years ago
Hi @MarcArumi
I'm planning to merge the PR this weekend, but I don't understand the need to change the package name.... :/
So I'm going to merge your first commit in the PR https://github.com/jjchiw/gelf4net/pull/65/commits/1aef88c2df3d0457dd00e0d25dbe53f8c5cc203e
Thanks for the PR :)
Hi @jjchiw my fault. Please use only the PR commit 1aef88c. I changed temporally the package name for my own projects but I pushed wrongly :S.
Thanks for the warning!
…this chunks and the usage of the interlocked.read
As you may see with this patch I’m trying to fix 3 issues.
With the current implementation the sender may send duplicated messages ids. Actually is reading the value and increment it in a thread safe way, but the read is not thread safe.
‘var chunkCount = (payload.Length / MaxChunkSize) + 1;’ Ex: chunksize 1024 and payload 2048, then chunkCount would be three when it should be two.
‘while (state.SendIndex <= state.ChunkCount)’ SendIndex start with 0 so it’s sending always and extra message