diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index 5bb359b353a9..f2da6e5153fd 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1931,6 +1931,12 @@ static void ftp_ssl_shutdown(ftpbuf_t *ftp, php_socket_t fd, SSL *ssl_handle) { /* SSL wants a write. Really odd. Let's bail out. */ done = 1; break; + case SSL_ERROR_SYSCALL: + /* most likely the peer closed the connection without + sending a close_notify shutdown alert; + bail out to avoid raising a spurious warning */ + done = 1; + break; default: if ((sslerror = ERR_get_error())) { ERR_error_string_n(sslerror, buf, sizeof(buf));