ruby-changes:23180
From: naruse <ko1@a...>
Date: Wed, 4 Apr 2012 10:34:08 +0900 (JST)
Subject: [ruby-changes:23180] naruse:r35230 (trunk): * lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and
naruse 2012-04-04 10:33:58 +0900 (Wed, 04 Apr 2012) New Revision: 35230 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35230 Log: * lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and read on closing. Modified files: trunk/ChangeLog trunk/lib/net/ftp.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 35229) +++ ChangeLog (revision 35230) @@ -1,3 +1,8 @@ +Wed Apr 4 10:33:31 2012 NARUSE, Yui <naruse@r...> + + * lib/ftp/ftp.rb (Net::FTP#close): ignore exceptions from shutdown and + read on closing. + Wed Apr 4 01:48:35 2012 NARUSE, Yui <naruse@r...> * lib/ftp/ftp.rb (Net::FTP#close): close socket more gracefully. Index: lib/net/ftp.rb =================================================================== --- lib/net/ftp.rb (revision 35229) +++ lib/net/ftp.rb (revision 35230) @@ -933,9 +933,9 @@ # def close if @sock and not @sock.closed? - @sock.shutdown(Socket::SHUT_WR) - @sock.read_timeout = 1 - @sock.read + @sock.shutdown(Socket::SHUT_WR) rescue nil + @sock.read_timeout = 3 + @sock.read rescue nil @sock.close end end -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/