From 698e9591a5dac2a903e706e92c5c18bb52897eca Mon Sep 17 00:00:00 2001 From: sirjonasxx <36828922+sirjonasxx@users.noreply.github.com> Date: Mon, 4 Jan 2021 18:35:51 +0100 Subject: [PATCH] dfghj,gh --- .../main/java/gearth/protocol/packethandler/PacketHandler.java | 2 -- .../protocol/packethandler/flash/FlashPacketHandler.java | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/G-Earth/src/main/java/gearth/protocol/packethandler/PacketHandler.java b/G-Earth/src/main/java/gearth/protocol/packethandler/PacketHandler.java index 01c5552..54d2226 100644 --- a/G-Earth/src/main/java/gearth/protocol/packethandler/PacketHandler.java +++ b/G-Earth/src/main/java/gearth/protocol/packethandler/PacketHandler.java @@ -11,14 +11,12 @@ public abstract class PacketHandler { protected final ExtensionHandler extensionHandler; private final Object[] trafficObservables; //get notified on packet send - protected final PayloadBuffer payloadBuffer; protected volatile int currentIndex = 0; protected final Object sendLock = new Object(); protected PacketHandler(ExtensionHandler extensionHandler, Object[] trafficObservables) { this.extensionHandler = extensionHandler; this.trafficObservables = trafficObservables; - this.payloadBuffer = new PayloadBuffer(); } diff --git a/G-Earth/src/main/java/gearth/protocol/packethandler/flash/FlashPacketHandler.java b/G-Earth/src/main/java/gearth/protocol/packethandler/flash/FlashPacketHandler.java index b894343..245422f 100644 --- a/G-Earth/src/main/java/gearth/protocol/packethandler/flash/FlashPacketHandler.java +++ b/G-Earth/src/main/java/gearth/protocol/packethandler/flash/FlashPacketHandler.java @@ -32,10 +32,13 @@ public abstract class FlashPacketHandler extends PacketHandler { private volatile List tempEncryptedBuffer = new ArrayList<>(); volatile boolean isEncryptedStream = false; + private final PayloadBuffer payloadBuffer; + FlashPacketHandler(OutputStream outputStream, Object[] trafficObservables, ExtensionHandler extensionHandler) { super(extensionHandler, trafficObservables); out = outputStream; + this.payloadBuffer = new PayloadBuffer(); } public boolean isDataStream() {return isDataStream;}