Skip to content

Commit

Permalink
Add additional lock inside event Activated handler
Browse files Browse the repository at this point in the history
  • Loading branch information
kekekeks committed Aug 7, 2013
1 parent 3992204 commit 769f8c4
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions ScgiSharp.Oars/OarsSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,13 @@ void CallMeOnEvent (Oars.Events events, Action act)
_activeEvents.Add (ev);
ev.Activated += () =>
{
ev.Delete ();
ev.Dispose ();
act ();
_activeEvents.Remove (ev);
lock (this)
{
ev.Delete ();
ev.Dispose ();
act ();
_activeEvents.Remove (ev);
}
};
ev.Add (new TimeSpan (7, 1, 1, 1));
}
Expand Down

0 comments on commit 769f8c4

Please sign in to comment.