Skip to content

Commit

Permalink
EventUpdate sorting correction
Browse files Browse the repository at this point in the history
  • Loading branch information
dhrovat committed Mar 31, 2021
1 parent 676e591 commit 237c37a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Sportradar.OddsFeed.SDK.API/IEventChangeManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ public interface IEventChangeManager
TimeSpan FixtureChangeInterval { get; }

/// <summary>
/// Gets the interval for getting new list of fixture changes
/// Gets the interval for getting new list of result changes
/// </summary>
/// <value>The fixture change interval.</value>
/// <value>The result change interval.</value>
TimeSpan ResultChangeInterval { get; }

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,8 @@ private void FixtureTimerOnElapsed(object sender, EventArgs e)
changes = _sportDataProvider.GetFixtureChangesAsync(LastFixtureChange, null, _config.DefaultLocale).Result;
}

changes = changes.OrderBy(o => o.UpdateTime);

foreach (var fixtureChange in changes)
{
if (!IsRunning)
Expand Down Expand Up @@ -279,6 +281,8 @@ private void ResultTimerOnElapsed(object sender, EventArgs e)
changes = _sportDataProvider.GetResultChangesAsync(LastResultChange, null, _config.DefaultLocale).Result;
}

changes = changes.OrderBy(o => o.UpdateTime);

foreach (var resultChange in changes)
{
if (!IsRunning)
Expand Down

0 comments on commit 237c37a

Please sign in to comment.