mirror of
https://github.com/cuberite/libevent.git
synced 2025-09-13 14:26:30 -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;
|
||||
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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user