mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-19 19:59:42 +00:00
Change custom payload lock to be buffer itself incase multiple packets use the same backend buffer. Closes #1908
This commit is contained in:
1 parent
e007f7cf39
commit
ee1e229b66
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -4,7 +4,7 @@
|
||||
public void func_148840_b(PacketBuffer p_148840_1_) throws IOException
|
||||
{
|
||||
p_148840_1_.func_180714_a(this.field_149562_a);
|
||||
+ synchronized(this) { //This may be access multiple times, from multiple threads, lets be safe.
|
||||
+ synchronized(this.field_149561_c) { //This may be access multiple times, from multiple threads, lets be safe.
|
||||
+ this.field_149561_c.markReaderIndex();
|
||||
p_148840_1_.writeBytes((ByteBuf)this.field_149561_c);
|
||||
+ this.field_149561_c.resetReaderIndex();
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@
|
||||
public void func_148840_b(PacketBuffer p_148840_1_) throws IOException
|
||||
{
|
||||
p_148840_1_.func_180714_a(this.field_149172_a);
|
||||
+ synchronized(this) { //This may be access multiple times, from multiple threads, lets be safe.
|
||||
+ synchronized(this.field_149171_b) { //This may be access multiple times, from multiple threads, lets be safe.
|
||||
+ this.field_149171_b.markReaderIndex();
|
||||
p_148840_1_.writeBytes((ByteBuf)this.field_149171_b);
|
||||
+ this.field_149171_b.resetReaderIndex();
|
||||
|
||||
Reference in new issue
Block a user