This commit is contained in:
2015-10-16 10:43:25 +02:00
parent acf62eaaed
commit df946b93de
2 changed files with 7 additions and 1 deletions
+2
View File
@@ -112,6 +112,8 @@ namespace ErgometerServer
throw new FormatException("Unknown command"); throw new FormatException("Unknown command");
} }
} }
server.RemoveActiveSession(this);
} }
public void SendToClient(NetCommand command) public void SendToClient(NetCommand command)
+5 -1
View File
@@ -28,7 +28,6 @@ namespace ErgometerServer
FileHandler.CheckStorage(); FileHandler.CheckStorage();
users = FileHandler.LoadUsers(); users = FileHandler.LoadUsers();
clients = new List<ClientThread>(); clients = new List<ClientThread>();
TcpListener listener = new TcpListener(NetHelper.GetIP("127.0.0.1"), 8888); TcpListener listener = new TcpListener(NetHelper.GetIP("127.0.0.1"), 8888);
@@ -157,6 +156,11 @@ namespace ErgometerServer
return sessions; return sessions;
} }
internal void RemoveActiveSession(ClientThread clientThread)
{
clients.Remove(clientThread);
}
private string GeneratePassword(int len = 8) private string GeneratePassword(int len = 8)
{ {
string pass = ""; string pass = "";