projects
/
libevent
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5ab9518
)
Fix dirty_shutdown for openssl 1.1
author
Azat Khuzhin
<a3at.mail@gmail.com>
Sat, 19 Nov 2016 15:00:36 +0000
(18:00 +0300)
committer
Azat Khuzhin
<a3at.mail@gmail.com>
Tue, 6 Dec 2016 22:34:27 +0000
(
01:34
+0300)
SSL_read() returns -1, even when underlying read() return 0
bufferevent_openssl.c
patch
|
blob
|
history
diff --git
a/bufferevent_openssl.c
b/bufferevent_openssl.c
index fe057f0acb7c1cd265504310354cfe601de99bad..812b5d061339843c254d84cfa941ed68fbeace37 100644
(file)
--- a/
bufferevent_openssl.c
+++ b/
bufferevent_openssl.c
@@
-504,7
+504,7
@@
conn_closed(struct bufferevent_openssl *bev_ssl, int when, int errcode, int ret)
break;
case SSL_ERROR_SYSCALL:
/* IO error; possibly a dirty shutdown. */
- if (
ret == 0
&& ERR_peek_error() == 0)
+ if (
(ret == 0 || ret == -1)
&& ERR_peek_error() == 0)
dirty_shutdown = 1;
break;
case SSL_ERROR_SSL: