Chats now only try to connect, if they are opened
This commit is contained in:
committed by
Felix Hartmann (PEA3-Fe-FI)
parent
b12d3f3f4f
commit
c00a7ff379
@@ -146,9 +146,11 @@ namespace PolyChat
|
||||
|
||||
private bool isInConnections(string IP)
|
||||
{
|
||||
if (Connections.ContainsKey(IP))
|
||||
return true;
|
||||
return false;
|
||||
return Connections.ContainsKey(IP);
|
||||
}
|
||||
public bool IsConnected(string ip)
|
||||
{
|
||||
return Connections.ContainsKey(ip) && Connections[ip].IsConnected();
|
||||
}
|
||||
|
||||
public static string getIP()
|
||||
@@ -195,7 +197,6 @@ namespace PolyChat
|
||||
ip = ip.Substring(0, ip.Length - 4);
|
||||
Debug.WriteLine($"-{ip}");
|
||||
Debug.WriteLine(jsonArr);
|
||||
Connect(ip);
|
||||
UIController.OnIncomingConnection(ip);
|
||||
UIController.OnIncomingMessages(ip, jsonArr);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user