Don't register https scheme in BungeeRotator
This commit is contained in:
parent
89ccaf4323
commit
d5160bf10b
@ -1,5 +1,7 @@
|
||||
package mineplex.bungee.api;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
import java.io.BufferedReader;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@ -10,16 +12,10 @@ import java.util.Locale;
|
||||
import java.util.TimeZone;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import javax.crypto.Mac;
|
||||
import javax.crypto.spec.SecretKeySpec;
|
||||
|
||||
import org.apache.commons.codec.binary.Hex;
|
||||
import org.apache.http.HttpResponse;
|
||||
import org.apache.http.client.HttpClient;
|
||||
import org.apache.http.client.methods.HttpRequestBase;
|
||||
import org.apache.http.conn.scheme.PlainSocketFactory;
|
||||
import org.apache.http.conn.scheme.Scheme;
|
||||
import org.apache.http.conn.scheme.SchemeRegistry;
|
||||
import org.apache.http.impl.client.DefaultHttpClient;
|
||||
import org.apache.http.impl.conn.PoolingClientConnectionManager;
|
||||
import org.apache.http.params.BasicHttpParams;
|
||||
@ -30,7 +26,7 @@ public abstract class DnsMadeEasyApiCallBase
|
||||
{
|
||||
public static final int TIMEOUT = (int) TimeUnit.SECONDS.toMillis(60);
|
||||
|
||||
protected String ApiUrl = "http://api.dnsmadeeasy.com/V2.0/dns/managed/";
|
||||
protected String ApiUrl = "https://api.dnsmadeeasy.com/V2.0/dns/managed/";
|
||||
protected int DomainId = 962728;
|
||||
protected String Category = "/records/";
|
||||
|
||||
@ -43,10 +39,7 @@ public abstract class DnsMadeEasyApiCallBase
|
||||
|
||||
protected String execute(HttpRequestBase request)
|
||||
{
|
||||
SchemeRegistry schemeRegistry = new SchemeRegistry();
|
||||
schemeRegistry.register(new Scheme("https", 80, PlainSocketFactory.getSocketFactory()));
|
||||
|
||||
PoolingClientConnectionManager connectionManager = new PoolingClientConnectionManager(schemeRegistry);
|
||||
PoolingClientConnectionManager connectionManager = new PoolingClientConnectionManager();
|
||||
connectionManager.setMaxTotal(200);
|
||||
connectionManager.setDefaultMaxPerRoute(20);
|
||||
|
||||
@ -80,13 +73,9 @@ public abstract class DnsMadeEasyApiCallBase
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
System.out.println("DnsMadeEasyApiCall Error:\n" + ex.getMessage());
|
||||
|
||||
for (StackTraceElement trace : ex.getStackTrace())
|
||||
{
|
||||
System.out.println(trace);
|
||||
}
|
||||
}
|
||||
System.out.println("DnsMadeEasyApiCall Error:");
|
||||
ex.printStackTrace();
|
||||
}
|
||||
finally
|
||||
{
|
||||
httpClient.getConnectionManager().shutdown();
|
||||
|
Loading…
Reference in New Issue
Block a user