Commit 12674f6c authored by Jaida Wu's avatar Jaida Wu
Browse files

Fallback to HTTP if no SSL cert


Signed-off-by: default avatarJaida Wu <mlgmxyysd@meowcat.org>
parent 23226ad4
...@@ -142,8 +142,9 @@ public final class DispatchServer { ...@@ -142,8 +142,9 @@ public final class DispatchServer {
httpsServer.setHttpsConfigurator(new HttpsConfigurator(sslContext)); httpsServer.setHttpsConfigurator(new HttpsConfigurator(sslContext));
server = httpsServer; server = httpsServer;
} catch (Exception e) { } catch (Exception e) {
Grasscutter.getLogger().error("No SSL cert found!"); Grasscutter.getLogger().error("No SSL cert found! Falling back to HTTP server.");
return; Grasscutter.getConfig().UseSSL = false;
server = HttpServer.create(getAddress(), 0);
} }
} else { } else {
server = HttpServer.create(getAddress(), 0); server = HttpServer.create(getAddress(), 0);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment