Skip to content

Commit 7cf7219

Browse files
authored
SF-6393 Use 1 as the initial millisecond order
0 often doesn't get serialized when submitted because it is the default value. Per discussion with @dkline we are going to use a non-default value to better differentiate between lib version submissions
1 parent ac92920 commit 7cf7219

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Src/StackifyLib/Internal/Logs/LogClient.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ public bool ErrorShouldBeSent(StackifyError error)
127127

128128

129129
private static long _lastEpochMs = 0;
130-
private static int _millisecondCount = 0;
130+
private static int _millisecondCount = 1;
131131

132132
public void QueueMessage(LogMsg msg)
133133
{
@@ -151,8 +151,8 @@ public void QueueMessage(LogMsg msg)
151151
// reset counter if we are no longer in the same ms
152152
//https://msdn.microsoft.com/en-us/library/system.threading.interlocked_methods(v=vs.110).aspx
153153
Interlocked.Exchange(ref _lastEpochMs, msg.EpochMs);
154-
Interlocked.Exchange(ref _millisecondCount, 0);
155-
msg.Order = 0;
154+
Interlocked.Exchange(ref _millisecondCount, 1);
155+
msg.Order = 1;
156156
}
157157
else if (_lastEpochMs == msg.EpochMs)
158158
{

0 commit comments

Comments
 (0)