Skip to content

Commit 56a68c8

Browse files
authored
move monitor enter readlock outside of try (#2780)
1 parent 750210e commit 56a68c8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Elasticsearch.Net/ConnectionPool/SniffingConnectionPool.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ public override void Reseed(IEnumerable<Node> nodes)
7474
/// <inheritdoc/>
7575
public override IEnumerable<Node> CreateView(Action<AuditEvent, Node> audit = null)
7676
{
77+
this._readerWriter.EnterReadLock();
7778
try
7879
{
79-
this._readerWriter.EnterReadLock();
8080
return base.CreateView(audit);
8181
}
8282
finally

0 commit comments

Comments
 (0)