ch5: fix code path

This commit is contained in:
chai2010
2016-01-21 09:58:28 +08:00
parent 3666d2f0e8
commit 20a8cf71b9
7 changed files with 19 additions and 18 deletions

View File

@@ -37,8 +37,8 @@ genesis: crashed: no parachute: G-switch failed: bad relay orientation
讓我們來看看處理錯誤的第二種策略。如果錯誤的發生是偶然性的,或由不可預知的問題導致的。一個明智的選擇是重新嚐試失敗的操作。在重試時,我們需要限製重試的時間間隔或重試的次數,防止無限製的重試。
<u><i>gopl.io/ch5/wait</i></u>
```Go
gopl.io/ch5/wait
// WaitForServer attempts to contact the server of a URL.
// It tries for one minute using exponential back-off.
// It reports an error if all attempts fail.