Issue #11260 has been updated by Benoit Daloze.

Status changed from Assigned to Closed

Thanks, committed in r51046.

----------------------------------------
Bug #11260: [PATCH] Net::FTP keeps a TCPServer opened when sending the data port fails
https://bugs.ruby-lang.org/issues/11260#change-53132

* Author: Benoit Daloze
* Status: Closed
* 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/