mirror of
https://github.com/sshnet/SSH.NET.git
synced 2026-09-11 01:36:39 +00:00
fix ca2002
https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2002
This commit is contained in:
@@ -5,14 +5,16 @@ namespace Renci.SshNet.Common
|
||||
{
|
||||
internal sealed class Lock
|
||||
{
|
||||
private readonly object _lockObject = new object();
|
||||
|
||||
public bool TryEnter()
|
||||
{
|
||||
return Monitor.TryEnter(this);
|
||||
return Monitor.TryEnter(_lockObject);
|
||||
}
|
||||
|
||||
public void Exit()
|
||||
{
|
||||
Monitor.Exit(this);
|
||||
Monitor.Exit(_lockObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user