mirror of
https://github.com/valitydev/thrift.git
synced 2024-11-07 02:45:22 +00:00
THRIFT-4919 THttpTransport.cs (netstd) and THttpClientTransport (netcore) have bad timeout code
Patch: Jens Geyer This closes #1847
This commit is contained in:
parent
26ef904600
commit
9cf37be1f1
@ -63,6 +63,7 @@ namespace Thrift.Transports.Client
|
||||
public int ConnectTimeout
|
||||
{
|
||||
set { _connectTimeout = value; }
|
||||
get { return _connectTimeout; }
|
||||
}
|
||||
|
||||
public override bool IsOpen => true;
|
||||
@ -145,7 +146,7 @@ namespace Thrift.Transports.Client
|
||||
|
||||
if (_connectTimeout > 0)
|
||||
{
|
||||
httpClient.Timeout = TimeSpan.FromSeconds(_connectTimeout);
|
||||
httpClient.Timeout = TimeSpan.FromMilliseconds(_connectTimeout);
|
||||
}
|
||||
|
||||
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/x-thrift"));
|
||||
|
@ -145,7 +145,7 @@ namespace Thrift.Transport.Client
|
||||
|
||||
if (_connectTimeout > 0)
|
||||
{
|
||||
httpClient.Timeout = TimeSpan.FromSeconds(_connectTimeout);
|
||||
httpClient.Timeout = TimeSpan.FromMilliseconds(_connectTimeout);
|
||||
}
|
||||
|
||||
httpClient.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/x-thrift"));
|
||||
|
Loading…
Reference in New Issue
Block a user