Don't need to connect if AdhocServer IP is the same with this instance localhost IP and having AdhocServer disabled

This commit is contained in:
ANR2ME 2020-10-19 22:46:25 +07:00
parent e11e8a7fda
commit 30b9f46aa5

View file

@ -2083,6 +2083,10 @@ int initNetwork(SceNetAdhocctlAdhocId *adhoc_id){
if (g_adhocServerIP.in.sin_addr.s_addr == INADDR_NONE)
return -1;
// Don't need to connect if AdhocServer IP is the same with this instance localhost IP and having AdhocServer disabled
if (g_adhocServerIP.in.sin_addr.s_addr == g_localhostIP.in.sin_addr.s_addr && !g_Config.bEnableAdhocServer)
return -1;
// Connect to Adhoc Server
int errorcode = 0;
int cnt = 0;