From a3cc8fc937473904f3b281614d2cf8bd146b059a Mon Sep 17 00:00:00 2001 From: shmyga Date: Wed, 13 Aug 2014 11:50:01 +0400 Subject: [PATCH] fixes --- src/client/haxe/ru/m/armageddon/client/frames/AuthFrame.hx | 2 +- .../ru/m/armageddon/core/connect/neko/NekoWebConnection.hx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/client/haxe/ru/m/armageddon/client/frames/AuthFrame.hx b/src/client/haxe/ru/m/armageddon/client/frames/AuthFrame.hx index 65ef2a1..d16873f 100755 --- a/src/client/haxe/ru/m/armageddon/client/frames/AuthFrame.hx +++ b/src/client/haxe/ru/m/armageddon/client/frames/AuthFrame.hx @@ -46,7 +46,7 @@ class AuthFrame extends VGroupView implements IPacketHandler { if (so.data.login != null && so.data.password != null) { loginInput.text = so.data.login; passwordInput.text = so.data.password; - onPress(null); + //onPress(null); } else { loginInput.text = "shmyga"; passwordInput.text = "xkbp8jh9z2"; diff --git a/src/common/haxe/ru/m/armageddon/core/connect/neko/NekoWebConnection.hx b/src/common/haxe/ru/m/armageddon/core/connect/neko/NekoWebConnection.hx index ce3a472..046277c 100644 --- a/src/common/haxe/ru/m/armageddon/core/connect/neko/NekoWebConnection.hx +++ b/src/common/haxe/ru/m/armageddon/core/connect/neko/NekoWebConnection.hx @@ -37,8 +37,10 @@ class NekoWebConnection extends NekoConnection { } } else { var data = parseData(bytes); - var packet = WebSocketTools.string2packet(data, builder); - receive(packet); + if (data != null) { + var packet = WebSocketTools.string2packet(data, builder); + receive(packet); + } } } @@ -186,6 +188,7 @@ class NekoWebConnection extends NekoConnection { if (opcode == 136) { //socket.close(); + opened = false; return null; }