This is an automated email from the ASF dual-hosted git repository.
jensg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new cd810bb Pass cancellation token to AcceptTcpClientAsync() in net6
Client: netstd Patch: Jens Geyer
cd810bb is described below
commit cd810bba7cb2d8c37f48f48a895713c2b2b42a6c
Author: Jens Geyer <[email protected]>
AuthorDate: Fri Mar 18 23:20:49 2022 +0100
Pass cancellation token to AcceptTcpClientAsync() in net6
Client: netstd
Patch: Jens Geyer
---
lib/netstd/Thrift/Transport/Server/TTlsServerSocketTransport.cs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/lib/netstd/Thrift/Transport/Server/TTlsServerSocketTransport.cs
b/lib/netstd/Thrift/Transport/Server/TTlsServerSocketTransport.cs
index 77abcae..2b7f80c 100644
--- a/lib/netstd/Thrift/Transport/Server/TTlsServerSocketTransport.cs
+++ b/lib/netstd/Thrift/Transport/Server/TTlsServerSocketTransport.cs
@@ -139,7 +139,11 @@ namespace Thrift.Transport.Server
try
{
+ #if NET6_0_OR_GREATER
+ var client = await
_server.AcceptTcpClientAsync(cancellationToken);
+ #else
var client = await _server.AcceptTcpClientAsync();
+ #endif
client.SendTimeout = client.ReceiveTimeout = _clientTimeout;
//wrap the client in an SSL Socket passing in the SSL cert