Skip to content

Commit

Permalink
Fix concurrency modification exception preventing delete button worki…
Browse files Browse the repository at this point in the history
…ng properly
  • Loading branch information
Beachman4 committed Mar 21, 2024
1 parent a9b2193 commit 090202b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class MEWirelessTransceiverBlockEntity(pos: BlockPos, blockState: BlockState) :
}

fun removedFromChannel(channelInfo: ChannelInfo) {
this.destroyConnections()
this.destroyConnections(false)
this.channelId = null
this.channelConnectionType = null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,5 +103,7 @@ class ChannelHolder(val level: Level) {
blockEntity?.setChanged()
subscribers.forEach { it.removedFromChannel(channelInfo) }
subscribers.forEach { it.setChanged() }
channel.subscribers.clear()
channel.broadcaster = null
}
}

0 comments on commit 090202b

Please sign in to comment.