Skip to content

Commit

Permalink
Merge pull request #155 from nats-io/fix-race
Browse files Browse the repository at this point in the history
Fix race condition
  • Loading branch information
Colin Sullivan authored Apr 18, 2017
2 parents fd19890 + 23492ff commit 9e98917
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion NATS.Client/AsyncSub.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,10 @@ internal protected override bool processMsg(Msg msg)
if (d == max)
{
unsubscribe(false);
conn = null;
lock (mu)
{
conn = null;
}
}
}

Expand Down

0 comments on commit 9e98917

Please sign in to comment.