From b1dede0e595410e1aa1380a33ca75b7ff684a077 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Sat, 23 Jan 2016 19:37:57 +0100 Subject: [PATCH] polarssl: fix handling SSL close notification Signed-off-by: Felix Fietkau --- ustream-polarssl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ustream-polarssl.c b/ustream-polarssl.c index 57b3714..39bde21 100644 --- a/ustream-polarssl.c +++ b/ustream-polarssl.c @@ -242,6 +242,9 @@ __hidden int __ustream_ssl_read(struct ustream_ssl *us, char *buf, int len) if (ssl_do_wait(ret)) return U_SSL_PENDING; + if (ret == POLARSSL_ERR_SSL_PEER_CLOSE_NOTIFY) + return 0; + ustream_ssl_error(us, ret); return U_SSL_ERROR; } -- 2.25.1