mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-13 06:16:10 -04:00
Fix dirty_shutdown for openssl 1.1
SSL_read() returns -1, even when underlying read() return 0
This commit is contained in:
parent
5ab9518f15
commit
d94b1762c5
@ -504,7 +504,7 @@ conn_closed(struct bufferevent_openssl *bev_ssl, int when, int errcode, int ret)
|
|||||||
break;
|
break;
|
||||||
case SSL_ERROR_SYSCALL:
|
case SSL_ERROR_SYSCALL:
|
||||||
/* IO error; possibly a dirty shutdown. */
|
/* 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;
|
dirty_shutdown = 1;
|
||||||
break;
|
break;
|
||||||
case SSL_ERROR_SSL:
|
case SSL_ERROR_SSL:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user