Skip to content

Commit c82143f

Browse files
committed
Remove sync from ConnectionTarget#toString
When introduced in elastic#39629 we needed to acquire `mutex` here because the `toString()` result included a mutable field, but we dropped that field in elastic#77295. This commit removes the now-unnecessary synchronization.
1 parent cc461af commit c82143f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

server/src/main/java/org/elasticsearch/cluster/NodeConnectionsService.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,7 @@ void disconnect() {
342342

343343
@Override
344344
public String toString() {
345-
synchronized (mutex) {
346-
return "ConnectionTarget{" + "discoveryNode=" + discoveryNode + '}';
347-
}
345+
return "ConnectionTarget{discoveryNode=" + discoveryNode + '}';
348346
}
349347
}
350348
}

0 commit comments

Comments
 (0)