[ 
https://issues.apache.org/jira/browse/THRIFT-5499?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17477139#comment-17477139
 ] 

Plumet commented on THRIFT-5499:
--------------------------------

I've done a little research and here is my conclusion:

The underlying operation that's used to read from the stream is ReadAsync. 
Reading asynchronously does not trigger the ReceiveTimeout. 

cfr. The .Net docs 
[https://docs.microsoft.com/en-us/dotnet/api/system.net.sockets.socket.receivetimeout?view=net-6.0]

Gets or sets a value that specifies the amount of time after which a 
_synchronous_ Receive call will time out.

cfr. The underlying winsock docs 
[https://docs.microsoft.com/en-us/windows/win32/winsock/sol-socket-socket-options:]

The timeout, in milliseconds, for _blocking_ receive calls.

Point is, when this value is set in the Thrift client, the client should be 
using blocking calls in a separate task/thread.

> Receive timeout not triggered when response exceeds timeout
> -----------------------------------------------------------
>
>                 Key: THRIFT-5499
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5499
>             Project: Thrift
>          Issue Type: Bug
>          Components: netstd - Library
>    Affects Versions: 0.15.0, 0.16.0
>            Reporter: Plumet
>            Priority: Major
>             Fix For: 0.16.0
>
>         Attachments: THRIFT-ReceiveTimeout.zip
>
>
> When the client's timeout is set to valid value and the response exceeds this 
> timeout there is no exception thrown.
> I've provided a reproducible testcase[^THRIFT-ReceiveTimeout.zip].



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to