Permalink
Browse files

fix AcceptAsync await

  • Loading branch information...
darkcrash committed Jan 11, 2016
1 parent c16ce8b commit a9049f8630d2e788dda19065026c415654efcd05
Showing with 44 additions and 38 deletions.
  1. +37 −37 BJD.sln
  2. +7 −1 Bjd.Common.CoreCLR/sock/SockServerTcp.cs
View
74 BJD.sln
@@ -47,7 +47,7 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Bjd.ProxyFtpServer.CoreCLR"
EndProject
Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Bjd.DhcpServer.CoreCLR", "Bjd.DhcpServer.CoreCLR\Bjd.DhcpServer.CoreCLR.xproj", "{CD1276EE-55F6-4AE8-97B8-5FE3222EE63A}"
EndProject
Project("{151D2E53-A2C4-4D7D-83FE-D05416EBD58E}") = "Bjd.AzureResourceGroup", "Bjd.AzureResourceGroup\Bjd.AzureResourceGroup.deployproj", "{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}"
Project("{151D2E53-A2C4-4D7D-83FE-D05416EBD58E}") = "Bjd.AzureResourceGroup", "Bjd.AzureResourceGroup\Bjd.AzureResourceGroup.deployproj", "{4729C222-4560-413A-8E12-E9DA1803EA15}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -719,42 +719,42 @@ Global
{CD1276EE-55F6-4AE8-97B8-5FE3222EE63A}.Tmp|Mixed Platforms.Build.0 = Debug|Any CPU
{CD1276EE-55F6-4AE8-97B8-5FE3222EE63A}.Tmp|x86.ActiveCfg = Debug|Any CPU
{CD1276EE-55F6-4AE8-97B8-5FE3222EE63A}.Tmp|x86.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.CD_ROM|Any CPU.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.CD_ROM|Any CPU.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.CD_ROM|Mixed Platforms.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.CD_ROM|Mixed Platforms.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.CD_ROM|x86.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.CD_ROM|x86.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Debug|Any CPU.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Debug|x86.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Debug|x86.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.DVD-5|Any CPU.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.DVD-5|Mixed Platforms.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.DVD-5|x86.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.DVD-5|x86.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Release|Any CPU.ActiveCfg = Release|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Release|Any CPU.Build.0 = Release|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Release|x86.ActiveCfg = Release|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Release|x86.Build.0 = Release|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.SingleImage|Any CPU.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.SingleImage|Any CPU.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.SingleImage|Mixed Platforms.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.SingleImage|Mixed Platforms.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.SingleImage|x86.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.SingleImage|x86.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Tmp|Any CPU.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Tmp|Any CPU.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Tmp|Mixed Platforms.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Tmp|Mixed Platforms.Build.0 = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Tmp|x86.ActiveCfg = Debug|Any CPU
{20FCA760-4FF2-4C9D-AF71-6D57C1C11479}.Tmp|x86.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.CD_ROM|Any CPU.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.CD_ROM|Any CPU.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.CD_ROM|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.CD_ROM|Mixed Platforms.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.CD_ROM|x86.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.CD_ROM|x86.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Debug|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Debug|Mixed Platforms.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Debug|x86.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Debug|x86.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.DVD-5|Any CPU.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.DVD-5|Any CPU.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.DVD-5|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.DVD-5|Mixed Platforms.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.DVD-5|x86.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.DVD-5|x86.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Release|Any CPU.Build.0 = Release|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Release|Mixed Platforms.ActiveCfg = Release|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Release|Mixed Platforms.Build.0 = Release|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Release|x86.ActiveCfg = Release|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Release|x86.Build.0 = Release|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.SingleImage|Any CPU.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.SingleImage|Any CPU.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.SingleImage|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.SingleImage|Mixed Platforms.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.SingleImage|x86.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.SingleImage|x86.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Tmp|Any CPU.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Tmp|Any CPU.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Tmp|Mixed Platforms.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Tmp|Mixed Platforms.Build.0 = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Tmp|x86.ActiveCfg = Debug|Any CPU
{4729C222-4560-413A-8E12-E9DA1803EA15}.Tmp|x86.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -91,7 +91,13 @@ public SockTcp Select(ILife iLife)
System.Diagnostics.Trace.TraceInformation($"SockServer.Select");
var tTcp = _socket.AcceptAsync();
tTcp.Wait(this.Kernel.CancelToken);
while (true)
{
if (tTcp.Wait(2000, this.Kernel.CancelToken))
break;
if (tTcp.Status == TaskStatus.Canceled)
break;
}
if (this.IsCancel || !iLife.IsLife())
{
SetError("isLife()==false");

0 comments on commit a9049f8

Please sign in to comment.