mirror of
https://github.com/sirjonasxx/G-Earth.git
synced 2024-11-27 02:40:51 +01:00
Print message when failing to connect to Habbo
This commit is contained in:
parent
b6d5875f5f
commit
ba98a0689b
@ -149,7 +149,13 @@ public class ConnectionInterceptor {
|
|||||||
try {
|
try {
|
||||||
Socket server;
|
Socket server;
|
||||||
if (!useSocks) {
|
if (!useSocks) {
|
||||||
|
try {
|
||||||
server = new Socket(proxy.getActual_domain(), proxy.getActual_port());
|
server = new Socket(proxy.getActual_domain(), proxy.getActual_port());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("Failed to connect to Habbo server {}:{}", proxy.getActual_domain(), proxy.getActual_port());
|
||||||
|
callbacks.onInterceptorError();
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
SocksConfiguration configuration = ProxyProviderFactory.getSocksConfig();
|
SocksConfiguration configuration = ProxyProviderFactory.getSocksConfig();
|
||||||
@ -163,9 +169,8 @@ public class ConnectionInterceptor {
|
|||||||
|
|
||||||
callbacks.onInterceptorConnected(client, server, proxy);
|
callbacks.onInterceptorConnected(client, server, proxy);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// should only happen when SOCKS configured badly
|
|
||||||
callbacks.onInterceptorError();
|
|
||||||
logger.error("Error occurred while intercepting connection", e);
|
logger.error("Error occurred while intercepting connection", e);
|
||||||
|
callbacks.onInterceptorError();
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user