Skip to content

Commit

Permalink
resolved build warning inside AkkaProtocolSpec (#7036)
Browse files Browse the repository at this point in the history
  • Loading branch information
Aaronontheweb authored Jan 4, 2024
1 parent ca1889d commit 70787ae
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/core/Akka.Remote.Tests/Transport/AkkaProtocolSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,19 +111,17 @@ private Collaborators GetCollaborators()

private class TestFailureDetector : FailureDetector
{
#pragma warning disable CS0420
private volatile bool _isAvailable = true;
public override bool IsAvailable => Volatile.Read(ref _isAvailable);
public override bool IsAvailable => _isAvailable;
public void SetAvailable(bool available) => Volatile.Write(ref _isAvailable, available);

private volatile bool _called;
public override bool IsMonitoring => Volatile.Read(ref _called);
public override bool IsMonitoring => _called;

public override void HeartBeat()
{
Volatile.Write(ref _called, true);
}
#pragma warning restore CS0420
}

private readonly Config _config;
Expand Down

0 comments on commit 70787ae

Please sign in to comment.