From c1711d39d30e449947098ff9a0892e92c6ff978e Mon Sep 17 00:00:00 2001 From: Gravit Date: Sun, 10 Feb 2019 15:51:20 +0700 Subject: [PATCH] =?UTF-8?q?[FIX]=20Request=20=D0=BF=D0=BE=D0=B4=D0=B4?= =?UTF-8?q?=D0=B5=D1=80=D0=B6=D0=B8=D0=B2=D0=B0=D0=B5=D1=82=20=D0=B2=D0=BE?= =?UTF-8?q?=D0=B7=D0=BC=D0=BE=D0=B6=D0=BD=D0=BE=D1=81=D1=82=D1=8C=20=D0=BF?= =?UTF-8?q?=D0=B5=D1=80=D0=B5=D1=85=D0=BE=D0=B4=D0=B0=20=D0=BD=D0=B0=20Web?= =?UTF-8?q?Sockets?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/ru/gravit/launcher/request/Request.java | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java b/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java index 496b314a..a3de66a9 100644 --- a/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java +++ b/LauncherAPI/src/main/java/ru/gravit/launcher/request/Request.java @@ -57,7 +57,8 @@ protected final void readError(HInput input) throws IOException { public R request() throws Exception { if (!started.compareAndSet(false, true)) throw new IllegalStateException("Request already started"); - + R wsResult = requestWebSockets(); + if(wsResult != null) return wsResult; // Make request to LaunchServer try (Socket socket = IOHelper.newSocket()) { socket.connect(IOHelper.resolve(config.address)); @@ -68,7 +69,10 @@ public R request() throws Exception { } } } - + protected R requestWebSockets() throws Exception + { + return null; + } @LauncherAPI protected abstract R requestDo(HInput input, HOutput output) throws Exception;