You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by jk...@apache.org on 2018/03/20 20:32:49 UTC
thrift git commit: THRIFT-4524: .NET Core Server doesn't close
properly when cancelled Also fixed up the project files to include quoted
Program Files paths Client: netcore
Repository: thrift
Updated Branches:
refs/heads/master e46419b5e -> 22bd3450c
THRIFT-4524: .NET Core Server doesn't close properly when cancelled
Also fixed up the project files to include quoted Program Files paths
Client: netcore
This closes #1512
Project: http://git-wip-us.apache.org/repos/asf/thrift/repo
Commit: http://git-wip-us.apache.org/repos/asf/thrift/commit/22bd3450
Tree: http://git-wip-us.apache.org/repos/asf/thrift/tree/22bd3450
Diff: http://git-wip-us.apache.org/repos/asf/thrift/diff/22bd3450
Branch: refs/heads/master
Commit: 22bd3450c6e97e348d64fb6a75171e8ced79d1e4
Parents: e46419b
Author: Stephen Starkie <st...@egtechnology.co.uk>
Authored: Tue Mar 20 13:28:40 2018 +0000
Committer: James E. King III <jk...@apache.org>
Committed: Tue Mar 20 16:32:32 2018 -0400
----------------------------------------------------------------------
lib/netcore/Thrift/Server/AsyncBaseServer.cs | 6 +++++-
test/netcore/Client/Client.csproj | 6 +++---
test/netcore/Server/Server.csproj | 2 +-
3 files changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/thrift/blob/22bd3450/lib/netcore/Thrift/Server/AsyncBaseServer.cs
----------------------------------------------------------------------
diff --git a/lib/netcore/Thrift/Server/AsyncBaseServer.cs b/lib/netcore/Thrift/Server/AsyncBaseServer.cs
index 0032ca3..325c39c 100644
--- a/lib/netcore/Thrift/Server/AsyncBaseServer.cs
+++ b/lib/netcore/Thrift/Server/AsyncBaseServer.cs
@@ -100,7 +100,11 @@ namespace Thrift.Server
}
else
{
- await Task.Delay(TimeSpan.FromMilliseconds(_clientWaitingDelay), cancellationToken);
+ try
+ {
+ await Task.Delay(TimeSpan.FromMilliseconds(_clientWaitingDelay), cancellationToken);
+ }
+ catch(TaskCanceledException) { }
}
}
http://git-wip-us.apache.org/repos/asf/thrift/blob/22bd3450/test/netcore/Client/Client.csproj
----------------------------------------------------------------------
diff --git a/test/netcore/Client/Client.csproj b/test/netcore/Client/Client.csproj
index 4b31a7d..f16af39 100644
--- a/test/netcore/Client/Client.csproj
+++ b/test/netcore/Client/Client.csproj
@@ -1,4 +1,4 @@
-<Project Sdk="Microsoft.NET.Sdk">
+<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp2.0</TargetFramework>
<AssemblyName>Client</AssemblyName>
@@ -24,8 +24,8 @@
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="where thrift" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="PathToThrift" />
</Exec>
- <Exec Condition="Exists('$(PathToThrift)')" Command="$(PathToThrift) -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('$(PathToThrift)')" Command=""$(PathToThrift)" -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
<Exec Condition="Exists('thrift')" Command="thrift -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
<Exec Condition="Exists('$(ProjectDir)/../../../compiler/cpp/thrift')" Command="$(ProjectDir)/../../../compiler/cpp/thrift -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
</Target>
-</Project>
\ No newline at end of file
+</Project>
http://git-wip-us.apache.org/repos/asf/thrift/blob/22bd3450/test/netcore/Server/Server.csproj
----------------------------------------------------------------------
diff --git a/test/netcore/Server/Server.csproj b/test/netcore/Server/Server.csproj
index ad2fb7c..2f9b4b1 100644
--- a/test/netcore/Server/Server.csproj
+++ b/test/netcore/Server/Server.csproj
@@ -24,7 +24,7 @@
<Exec Condition="'$(OS)' == 'Windows_NT'" Command="where thrift" ConsoleToMSBuild="true">
<Output TaskParameter="ConsoleOutput" PropertyName="PathToThrift" />
</Exec>
- <Exec Condition="Exists('$(PathToThrift)')" Command="$(PathToThrift) -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
+ <Exec Condition="Exists('$(PathToThrift)')" Command=""$(PathToThrift)" -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
<Exec Condition="Exists('thrift')" Command="thrift -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
<Exec Condition="Exists('$(ProjectDir)/../../../compiler/cpp/thrift')" Command="$(ProjectDir)/../../../compiler/cpp/thrift -out $(ProjectDir) -gen netcore:wcf,union,serial,hashcode -r ./../../ThriftTest.thrift" />
</Target>