restsharp/RestSharp — pull request #309 by Haacked (2012-08-05 04:00:42+00:00)
Title: Fix problem with setting request timeout

Hi all! It's me again.

The code I replaced was the following line:

```
http.Timeout = request.Timeout == 0 ? Timeout : request.Timeout;
```

Note that if `request.Timeout` and `this.Timeout` are both `0`, this code would set `http.Timeout` to `0`, overriding whatever value it might have been already.

_What? "`http.Timeout` is by default `0` so this is a noop?" you say?_

In the immortal words of Bart Simpson, au contraire, mon frère! You can't know that. RestSharp provides an extensibility point via the `HttpFactory` property of `RestClient` which allows you to substitute your own `IHttpFactory`.

This is how I found the issue because I overrode the `IHttpFactory` so that I could supply some defaults universally - whether I'm using an instance of `RestClient` or `Http` to make the request.

This pull request makes it so you simply don't set the property unless the `Timeout` of the request or the `RestClient` is greater than `0`.