hibri/HttpMock — pull request #7 by knocte (2012-11-21 18:31:25+00:00)
Title: HttpServer: Fix IsAvailable() to be able to return FALSE

If the method .Start() of HttpServer was not called, IsAvailable() was
throwing an exception instead of returning FALSE.

This change has the added benefit that improves HttpMock a lot when run
with Mono. Why? Because apparently the _thread.Start(); in Microsoft.NET
is very fast and IsAvailable always was queried AFTER the server thread
had already started Kayak. In Mono, this fast is not so fast, so then
IsAvailable was throwing the exception and not using the retrying loop
(that is already in place) properly.

This is not a Mono bug. When using multi-threading code, you should never
assume any certain speed of any thread.