Browse Source

[server] Bugfix: Actually start the TcpListener

master
Starbeamrainbowlabs 4 years ago
parent
commit
9569e2c59b
1 changed files with 2 additions and 0 deletions
  1. +2
    -0
      PixelHub-Server/PixelHub/PixelHub.cs

+ 2
- 0
PixelHub-Server/PixelHub/PixelHub.cs View File

@ -99,11 +99,13 @@ namespace PixelHub.Server
public async Task Listen()
{
server = new TcpListener(Endpoint);
server.Start();
logger.WriteLine("TCP Listener set up on {0}.", Endpoint);
Active = true;
while(true)
{
TcpClient nextClient = await server.AcceptTcpClientAsync();
Console.WriteLine("Got connection");
AsyncTools.ForgetTask(Handle(nextClient));
}
// TODO: Add an shutdown CancellationToken thingy here