Skip to content

Commit

Permalink
Fallback to HTTP if no SSL cert
Browse files Browse the repository at this point in the history
Signed-off-by: Jaida Wu <mlgmxyysd@meowcat.org>
  • Loading branch information
MlgmXyysd committed Apr 21, 2022
1 parent a156789 commit 2df8625
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,9 @@ public void start() throws Exception {
httpsServer.setHttpsConfigurator(new HttpsConfigurator(sslContext));
server = httpsServer;
} catch (Exception e) {
Grasscutter.getLogger().error("No SSL cert found!");
return;
Grasscutter.getLogger().error("No SSL cert found! Falling back to HTTP server.");
Grasscutter.getConfig().UseSSL = false;
server = HttpServer.create(getAddress(), 0);
}
} else {
server = HttpServer.create(getAddress(), 0);
Expand Down

0 comments on commit 2df8625

Please sign in to comment.