diff --git a/src/main/java/org/bdware/server/nodecenter/NodeCenterFrameHandler.java b/src/main/java/org/bdware/server/nodecenter/NodeCenterFrameHandler.java index 4496e87..26ebd63 100644 --- a/src/main/java/org/bdware/server/nodecenter/NodeCenterFrameHandler.java +++ b/src/main/java/org/bdware/server/nodecenter/NodeCenterFrameHandler.java @@ -82,7 +82,7 @@ public class NodeCenterFrameHandler extends SimpleChannelInboundHandler try { map = JsonParser.parseReader( - new InputStreamReader(new ByteBufInputStream((ByteBuf) frame))) + new InputStreamReader(new ByteBufInputStream((ByteBuf) frame))) .getAsJsonObject(); } catch (Exception e) { @@ -136,7 +136,7 @@ public class NodeCenterFrameHandler extends SimpleChannelInboundHandler } } - public void sendMsg(String json) { + public synchronized void sendMsg(String json) { if (ctx != null) { // System.out.println("[NodeCenterFrame send] TID:" + Thread.currentThread().getId() + " // isOpen:"