diff --git a/code/server/Server/PongServer.cs b/code/server/Server/PongServer.cs index 679a81a..bd9fa6a 100644 --- a/code/server/Server/PongServer.cs +++ b/code/server/Server/PongServer.cs @@ -62,11 +62,14 @@ public class PongServer Console.WriteLine("Connection " + choisenRoom.Key); if (choisenRoom.Value != default ) { - Join(data, remoteEndPoint, serverSocket, choisenRoom.Value); + Thread join = new Thread(() => Join(data, remoteEndPoint, serverSocket, choisenRoom.Value)); + join.Start(); + } else { - Host(data, remoteEndPoint, serverSocket, true); + Thread host = new Thread(() => Host(data, remoteEndPoint, serverSocket, true)); + host.Start(); } } diff --git a/code/server/Server/Room.cs b/code/server/Server/Room.cs index 9153c57..76a33b6 100644 --- a/code/server/Server/Room.cs +++ b/code/server/Server/Room.cs @@ -78,8 +78,6 @@ namespace Server ScoreImp = data.Data.Item2 != null ? data.Data.Item2 : ScoreImp; } catch (Exception ex) { } - - }