wanshenmean
8 天以前 adb4016b5eb5b119a899480c321be996d9bf10bd
Code/WCS/WIDESEAWCS_Server/WIDESEAWCS_Tasks/SocketServer/TcpSocketServer.Server.cs
@@ -19,11 +19,11 @@
        /// </remarks>
        /// <param name="cancellationToken">取消令牌</param>
        /// <returns>启动任务</returns>
        public Task StartAsync(CancellationToken cancellationToken)
        public async Task StartAsync(CancellationToken cancellationToken)
        {
            if (IsRunning || !_options.Enabled)
            {
                return Task.CompletedTask;
                return;
            }
            // 解析监听地址
@@ -32,6 +32,8 @@
            {
                ipAddress = parsedAddress;
            }
            await Task.Delay(5000);
            // 创建监听器
            _listener = new TcpListener(ipAddress, _options.Port);
@@ -45,7 +47,7 @@
            // 启动客户端监控任务(检查空闲超时)
            _monitorTask = Task.Run(() => MonitorClientsAsync(_cts.Token));
            return Task.CompletedTask;
            return;
        }
        /// <summary>