From b4eaa1e5e3490f4dfdca803fd4e4b847376b4a9c Mon Sep 17 00:00:00 2001 From: "Victor J. Orlikowski" Date: Thu, 28 Jun 2001 21:29:19 +0000 Subject: [PATCH] Close the sockets, the right way this time. Use the ones that the connections are using, rather than those used to initialize the connection. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@89481 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/proxy_ftp.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/proxy/proxy_ftp.c b/modules/proxy/proxy_ftp.c index 9db0751954..34a15be23f 100644 --- a/modules/proxy/proxy_ftp.c +++ b/modules/proxy/proxy_ftp.c @@ -1592,7 +1592,7 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, apr_brigade_cleanup(bb); } ap_flush_conn(remote); - apr_socket_close(remote_sock); + apr_socket_close(remote->client_socket); ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server, "proxy: FTP: Closing Data connection."); rc = ftp_getrc_msg(origin, cbb, buffer, sizeof(buffer)); @@ -1650,7 +1650,8 @@ int ap_proxy_ftp_handler(request_rec *r, proxy_server_conf *conf, rc = ftp_getrc_msg(origin, cbb, buffer, sizeof(buffer)); ap_log_error(APLOG_MARK, APLOG_DEBUG|APLOG_NOERRNO, 0, r->server, "proxy: FTP: %d %s", rc, buffer); - apr_socket_close(sock); + ap_flush_conn(origin); + apr_socket_close(origin->client_socket); apr_brigade_destroy(bb); return OK; } -- 2.50.1