aboutsummaryrefslogtreecommitdiff
path: root/sample
diff options
context:
space:
mode:
authorHaibo Huang <hhb@google.com>2019-08-01 16:15:45 -0700
committerHaibo Huang <hhb@google.com>2019-08-01 16:15:45 -0700
commit45729099ea2d084c18bb1b1f906844ebad0b4053 (patch)
tree11757ef184106ed6620caa712f103d75f8c32f42 /sample
parentb22796788b72b1daca42bf5773b582d26860ef0a (diff)
downloadlibevent-45729099ea2d084c18bb1b1f906844ebad0b4053.tar.gz
Upgrade libevent to release-2.1.11-stable
Test: None Change-Id: Ic8d8dbcc23eb124f36f9cf0f6427751b2a460067
Diffstat (limited to 'sample')
-rw-r--r--sample/https-client.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sample/https-client.c b/sample/https-client.c
index 5869974..58e449b 100644
--- a/sample/https-client.c
+++ b/sample/https-client.c
@@ -53,7 +53,7 @@ http_request_done(struct evhttp_request *req, void *ctx)
char buffer[256];
int nread;
- if (req == NULL) {
+ if (!req || !evhttp_request_get_response_code(req)) {
/* If req is NULL, it means an error occurred, but
* sadly we are mostly left guessing what the error
* might have been. We'll do our best... */