Make -loop survive errors.

This is otherwise rather annoying when testing things against a browser
which will usually throw up a cert error or so.

Change-Id: Ia587efae65764430e39e3eb604e434b5919530cb
Reviewed-on: https://boringssl-review.googlesource.com/15126
Commit-Queue: Steven Valdez <svaldez@google.com>
Reviewed-by: Steven Valdez <svaldez@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
This commit is contained in:
David Benjamin 2017-04-14 19:27:48 -04:00 committed by CQ bot account: commit-bot@chromium.org
parent 8c62d9dd8b
commit 1ddd6e5365

View File

@ -250,14 +250,15 @@ bool Server(const std::vector<std::string> &args) {
int ssl_err = SSL_get_error(ssl.get(), ret); int ssl_err = SSL_get_error(ssl.get(), ret);
fprintf(stderr, "Error while connecting: %d\n", ssl_err); fprintf(stderr, "Error while connecting: %d\n", ssl_err);
ERR_print_errors_cb(PrintErrorCallback, stderr); ERR_print_errors_cb(PrintErrorCallback, stderr);
return false; result = false;
continue;
} }
fprintf(stderr, "Connected.\n"); fprintf(stderr, "Connected.\n");
PrintConnectionInfo(ssl.get()); PrintConnectionInfo(ssl.get());
result = TransferData(ssl.get(), sock); result = TransferData(ssl.get(), sock);
} while (result && args_map.count("-loop") != 0); } while (args_map.count("-loop") != 0);
return result; return result;
} }