Merge "camput: final error printing"

This commit is contained in:
Brad Fitzpatrick 2012-10-28 11:08:10 +00:00 committed by Gerrit Code Review
commit 137528b7d6
1 changed files with 8 additions and 2 deletions

View File

@ -253,8 +253,14 @@ func camputMain(args ...string) {
log.Printf("Client stats: %s", stats.String())
log.Printf(" #HTTP reqs: %d", up.transport.reqs)
}
if err != nil || wereErrors /* TODO: remove this part */ {
log.Printf("Error: %v", err)
previousErrors := wereErrors
if err != nil {
wereErrors = true
if !previousErrors {
log.Printf("Error: %v", err)
}
}
if wereErrors {
exit(2)
}
}