Imported Upstream version 5.8.0.22

Former-commit-id: df344e34b07851d296efb3e6604c8db42b6f7aa3
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2017-10-19 20:04:20 +00:00
parent 5f4a27cc8a
commit 7d05485754
5020 changed files with 114082 additions and 186061 deletions

View File

@@ -87,15 +87,15 @@ namespace System.ServiceModel.Channels.Http
{
// HTTP channel could be accepted while there is no incoming request yet. The reply channel waits for the actual request.
// HTTP channel listeners do not accept more than one channel at a time.
DateTime start = DateTime.Now;
DateTime start = DateTime.UtcNow;
TimeSpan waitTimeout;
if (timeout == TimeSpan.MaxValue)
waitTimeout = TimeSpan.FromMilliseconds(int.MaxValue);
else
waitTimeout = timeout - (DateTime.Now - start);
waitTimeout = timeout - (DateTime.UtcNow - start);
accept_channel_handle.WaitOne (waitTimeout);
accept_channel_handle.Reset ();
TChannel ch = CreateChannel (timeout - (DateTime.Now - start));
TChannel ch = CreateChannel (timeout - (DateTime.UtcNow - start));
ch.Closed += delegate {
accept_channel_handle.Set ();
};

View File

@@ -94,7 +94,7 @@ namespace System.ServiceModel.Channels.Http
public bool TryDequeueRequest (ChannelDispatcher channel, TimeSpan timeout, out HttpContextInfo context)
{
DateTime start = DateTime.Now;
DateTime start = DateTime.UtcNow;
context = null;
HttpChannelListenerEntry ce = null;
@@ -111,7 +111,7 @@ namespace System.ServiceModel.Channels.Http
if (timeout == TimeSpan.MaxValue)
waitTimeout = TimeSpan.FromMilliseconds (int.MaxValue);
bool ret = ce.WaitHandle.WaitOne (waitTimeout);
return ret && TryDequeueRequest (channel, waitTimeout - (DateTime.Now - start), out context); // recurse, am lazy :/
return ret && TryDequeueRequest (channel, waitTimeout - (DateTime.UtcNow - start), out context); // recurse, am lazy :/
}
context = q.Dequeue ();
return true;

View File

@@ -113,12 +113,12 @@ namespace System.ServiceModel.Channels.Http
return;
close_started = true;
}
DateTime start = DateTime.Now;
DateTime start = DateTime.UtcNow;
// FIXME: consider timeout
AbortConnections (timeout - (DateTime.Now - start));
AbortConnections (timeout - (DateTime.UtcNow - start));
base.OnClose (timeout - (DateTime.Now - start));
base.OnClose (timeout - (DateTime.UtcNow - start));
}
protected string GetHeaderItem (string raw)