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;