diff options
author | Felix Fietkau <nbd@openwrt.org> | 2016-01-16 23:26:32 +0100 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2016-01-16 23:26:32 +0100 |
commit | cabb2e2641cea551d60b5b15f6cb1d092e6fbb03 (patch) | |
tree | d4d3e926ec0e1c3e8e85174b875757713298b8f2 /uclient-http.c | |
parent | 2c8a8ace280de8e91d998ac5c7507f456132361b (diff) | |
download | uclient-cabb2e2641cea551d60b5b15f6cb1d092e6fbb03.tar.gz |
http: detect connect failure
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'uclient-http.c')
-rw-r--r-- | uclient-http.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/uclient-http.c b/uclient-http.c index 3ffb88c..574dc01 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -736,6 +736,10 @@ static void uclient_notify_state(struct ustream *us) { struct uclient_http *uh = container_of(us, struct uclient_http, ufd.stream); + if (uh->ufd.stream.write_error) { + uclient_http_error(uh, UCLIENT_ERROR_CONNECT); + return; + } uclient_notify_eof(uh); } |