public async Task ListenerLoop() { var lingerOption = new LingerOption(true, 0); while (!_cancellationToken.IsCancellationRequested) { var client = await _listener.AcceptTcpClientAsync(); client.LingerState = lingerOption; _tcpServer.FireClientConnected(_tcpServer, client); ReadLoop(client); } }