cleanup TLS on tls_write error - hurl - Gopher/HTTP/HTTPS file grabber | |
git clone git://git.codemadness.org/hurl | |
Log | |
Files | |
Refs | |
README | |
LICENSE | |
--- | |
commit 49f3642c3fa644bc376ad67e33a8f686c72c7e06 | |
parent cbccd2ddfd3cc994f06c966eb88d088e52d92159 | |
Author: Hiltjo Posthuma <[email protected]> | |
Date: Fri, 16 Nov 2018 16:05:03 +0100 | |
cleanup TLS on tls_write error | |
Diffstat: | |
M hurl.c | 5 ++--- | |
1 file changed, 2 insertions(+), 3 deletions(-) | |
--- | |
diff --git a/hurl.c b/hurl.c | |
@@ -215,10 +215,9 @@ https_request(void) | |
"Connection: close\r\n" | |
"%s" | |
"\r\n", u.path, u.host, config_custom ? config_custom : ""); | |
- if ((r = tls_write(t, buf, strlen(buf))) == -1) { | |
+ if ((r = tls_write(t, buf, strlen(buf))) == -1) | |
fprintf(stderr, "tls_write: %s\n", tls_error(t)); | |
- exit(1); | |
- } | |
+ goto err; | |
/* NOTE: HTTP header must fit in the buffer */ | |
for (len = 0; len < sizeof(buf); len += r) { |