Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix ArgumentOutOfRangeException in HttpListenerManager.TryDequeueRequ…

…est when timeout is less than 0
  • Loading branch information...
commit 8b4f8c9a86c8a7fa1de57f650cf53f2a3a7e0eb6 1 parent 198ccdc
Maciej Paszta authored
View
1  mcs/class/System.ServiceModel/System.ServiceModel.Channels.Http/HttpListenerManager.cs
@@ -96,6 +96,7 @@ public bool TryDequeueRequest (ChannelDispatcher channel, TimeSpan timeout, out
lock (ce.RetrieverLock) {
var q = ce.ContextQueue;
if (q.Count == 0) {
+ if (timeout.TotalMilliseconds < 0) return false;
TimeSpan waitTimeout = timeout;
if (timeout == TimeSpan.MaxValue)
waitTimeout = TimeSpan.FromMilliseconds (int.MaxValue);
Please sign in to comment.
Something went wrong with that request. Please try again.