Skip to content

Commit c0d1ea6

Browse files
authored
fix: occasional "SENDING_CHUNKS stored lock does not equal lock attempted to be unlocked" (#3199)
1 parent a05929d commit c0d1ea6

File tree

1 file changed

+1
-1
lines changed
  • worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter

1 file changed

+1
-1
lines changed

worldedit-bukkit/src/main/java/com/fastasyncworldedit/bukkit/adapter/NMSAdapter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ protected static void beginChunkPacketSend(String worldName, IntPair pair, Stamp
181181
lock = new ChunkSendLock();
182182
}
183183
// Allow twice-read-locking, so if the packets have been created but not sent, we can queue another read
184-
if (lock.writeWaiting || lock.lock.getReadLockCount() > 1 || lock.lock.isWriteLocked()) {
184+
if (lock.writeWaiting || lock.lock.getReadLockCount() >= 1 || lock.lock.isWriteLocked()) {
185185
return lock;
186186
}
187187
stampedLock.stamp = lock.lock.readLock();

0 commit comments

Comments
 (0)