Skip to content

Commit

Permalink
Fixes error to get counter in WebSocket
Browse files Browse the repository at this point in the history
  • Loading branch information
lillo42 committed Feb 16, 2020
1 parent 675c499 commit 7af180c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions test/Mozilla.IoT.WebThing.AcceptanceTest/Things/EventThing.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ namespace Mozilla.IoT.WebThing.AcceptanceTest.Things
{
public class EventThing : Thing
{
private int _counter = 0;
public EventThing()
{
Task.Factory.StartNew(() =>
Expand All @@ -15,7 +14,7 @@ public EventThing()
{
Task.Delay(3_000).GetAwaiter().GetResult();
var @event = Overheated;
@event?.Invoke(this, _counter++);
@event?.Invoke(this, 0);
}
});

Expand All @@ -25,7 +24,7 @@ public EventThing()
{
Task.Delay(4_000).GetAwaiter().GetResult();
var @event = OtherEvent;
@event?.Invoke(this, _counter.ToString());
@event?.Invoke(this, 1.ToString());
}
});
}
Expand Down

0 comments on commit 7af180c

Please sign in to comment.