From 4bb2cd5be8f8337424414429a0932a7613e3f1bd Mon Sep 17 00:00:00 2001 From: shmyga Date: Sat, 28 Mar 2020 17:18:12 +0300 Subject: [PATCH] [network] fixes --- src/app/haxe/ru/m/puzzlez/net/Network.hx | 2 +- src/app/haxe/ru/m/puzzlez/view/StartFrame.hx | 2 +- src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/haxe/ru/m/puzzlez/net/Network.hx b/src/app/haxe/ru/m/puzzlez/net/Network.hx index df801b7..aa18ce5 100644 --- a/src/app/haxe/ru/m/puzzlez/net/Network.hx +++ b/src/app/haxe/ru/m/puzzlez/net/Network.hx @@ -28,7 +28,7 @@ import ru.m.puzzlez.proto.pack.Response; user = new UserProto().setName('Anonimus #${UUID.generateRandom(new Random()).toString().split("-").shift()}'); storage.write(USER_KEY, user); } - connection = ConnectionFactory.buildClientConnection("127.0.0.1", 6000, Response); + connection = ConnectionFactory.buildClientConnection("127.0.0.1", 5000, Response); connection.handler.connect(onConnectionChange); connection.receiveHandler.connect(onReceivePacket); connection.connect(); diff --git a/src/app/haxe/ru/m/puzzlez/view/StartFrame.hx b/src/app/haxe/ru/m/puzzlez/view/StartFrame.hx index b821458..86f498e 100644 --- a/src/app/haxe/ru/m/puzzlez/view/StartFrame.hx +++ b/src/app/haxe/ru/m/puzzlez/view/StartFrame.hx @@ -62,7 +62,7 @@ import ru.m.update.Updater; updateButton.visible = true; updateButton.text = 'Update ${info.version}'; } - }); + }).catchError(error -> L.w('Update', 'failed: ${error}')); } private function sourceViewFactory(index:Int, source:ImageListSource):ButtonView { diff --git a/src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx b/src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx index 8d9ed9d..b4fdc43 100644 --- a/src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx +++ b/src/server/haxe/ru/m/puzzlez/PuzzlezServer.hx @@ -41,7 +41,7 @@ class PuzzlezServer extends ThreadServer { L.d(TAG, 'Running'); L.i(TAG, 'Build: ${CompilationOption.get("build")}'); var host:String = Sys.args().length > 0 ? Sys.args()[0] : "0.0.0.0"; - var port:Int = Sys.args().length > 1 ? Std.parseInt(Sys.args()[1]) : 6000; + var port:Int = Sys.args().length > 1 ? Std.parseInt(Sys.args()[1]) : 5000; var wserver = new PuzzlezServer(); L.i(TAG, 'Start on ${host}:${port}'); wserver.run(host, port);