mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Request поддерживает возможность перехода на WebSockets
This commit is contained in:
parent
7f062e720a
commit
c1711d39d3
1 changed files with 6 additions and 2 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue