From: shugo@... Date: 2015-06-27T09:04:50+00:00 Subject: [ruby-core:69753] [Ruby trunk - Bug #11260] [Assigned] [PATCH] Net::FTP keeps a TCPServer opened when sending the data port fails Issue #11260 has been updated by Shugo Maeda. Status changed from Open to Assigned Assignee changed from Shugo Maeda to Benoit Daloze Benoit Daloze wrote: > @shugo, can I commit this? The patch looks fine. Please commit it. ---------------------------------------- Bug #11260: [PATCH] Net::FTP keeps a TCPServer opened when sending the data port fails https://bugs.ruby-lang.org/issues/11260#change-53130 * Author: Benoit Daloze * Status: Assigned * Priority: Normal * Assignee: Benoit Daloze * ruby -v: ruby 2.2.2p95 (2015-04-13 revision 50295) [x86_64-linux] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- `Net::FTP` will keep the `TCPServer` created in `makeport` opened if `sendport` fails. The patch sends the port in its (only) caller instead, so the TCPServer is appropriately closed no matter the outcome. This was detected with RubySpec and a leak checker based on test/lib/leakchecker.rb. ---Files-------------------------------- 0001-lib-net-ftp.rb-makeport-close-the-TCPServer.patch (3.43 KB) -- https://bugs.ruby-lang.org/