mono/mono — pull request #428 by paszczi (2012-08-14 11:52:04+00:00)
Title: Fix ArgumentOutOfRangeException in HttpListenerManager.TryDequeueRequest when timeout is less than 0

In rare situations timeout passed to TryDequeueRequest can be negative. This can happen if previous recurrent call to this method (from line 103) was called after waiting almost for "waitTimeout" value, in such case (DateTime.Now - start) can be greater than "waitTimeout" and, as a result, ArgumentOutOfRangeException is thrown from line 102. The patch makes sure that this doesn't happen.