From 3b09123de3de656d195dd31e84668edffadcaaba Mon Sep 17 00:00:00 2001 From: YanTao Date: Fri, 8 Feb 2019 11:41:41 +0800 Subject: [PATCH] Fix FTPS passive mode of data channel event poll Bugfix: when using passive mode of FTPS protocol, data channel events should be polled when creating data connection channel, instead of polling the event of ftp's self control channel, which may cause ftp transfer problem while using ftps and passive mode. --- ext/ftp/ftp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/ftp/ftp.c b/ext/ftp/ftp.c index fd8b7363a7..8f9f737678 100644 --- a/ext/ftp/ftp.c +++ b/ext/ftp/ftp.c @@ -1859,7 +1859,7 @@ data_accepted: php_pollfd p; int i; - p.fd = ftp->fd; + p.fd = data->fd; p.events = (err == SSL_ERROR_WANT_READ) ? (POLLIN|POLLPRI) : POLLOUT; p.revents = 0; -- 2.40.0