Jimdo/periodicnoise — pull request #33 by nightlyone (2013-11-15 13:28:50+00:00)
Title: distinguish between transient and permanent errors

In order to only retry on temporary problems, but fail on permanent
problems, let's build some logic to distinguish these.

We have 3 clear cases

1. We are beyond our time budget -> fail immediately
2. The remote is not reachable -> retry, if we could ever connect,
fail otherwise
3. The net package classifies this as Temporary condition or Timeout ->
retry

All other cases are considered permanent failures.

@mlafeldt PTAL

Reason I added this, is that I have seen endless retries on a bad file descriptor in the new code. I also not felt very good with endless retries.