From: Victor J. Orlikowski Date: Thu, 28 Jun 2001 21:29:19 +0000 (+0000) Subject: Close the sockets, the right way this time. X-Git-Tag: 2.0.20~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4eaa1e5e3490f4dfdca803fd4e4b847376b4a9c;p=apache 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 --- 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; }