[FIX] Проверка на доступность websockets в Request

This commit is contained in:
Gravit 2019-02-10 17:01:19 +07:00
parent be32df3e1e
commit a83754e7f1
No known key found for this signature in database
GPG key ID: 061981E1E85D3216

View file

@ -57,7 +57,9 @@ 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();
R wsResult = null;
if(config.nettyPort != 0)
wsResult = requestWebSockets();
if(wsResult != null) return wsResult;
// Make request to LaunchServer
try (Socket socket = IOHelper.newSocket()) {