Skip to content

Commit fe465fe

Browse files
committed
Net-client: remove unneeded synchronization block
1 parent bb6c9a5 commit fe465fe

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

java/libraries/net/src/processing/net/Client.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -621,10 +621,9 @@ public int readBytesUntil(int interesting, byte byteBuffer[]) {
621621
* @brief Returns the buffer as a String
622622
*/
623623
public String readString() {
624-
synchronized (bufferLock) {
625-
if (bufferIndex == bufferLast) return null;
626-
return new String(readBytes());
627-
}
624+
byte b[] = readBytes();
625+
if (b == null) return null;
626+
return new String(b);
628627
}
629628

630629

0 commit comments

Comments
 (0)