ruby-changes:62395
From: nagachika <ko1@a...>
Date: Sat, 25 Jul 2020 21:42:42 +0900 (JST)
Subject: [ruby-changes:62395] 578bacc471 (ruby_2_7): merge revision(s) 5e81e8675a020ecd493620a4ff38db8fcf4b972a: [Backport #16780]
https://git.ruby-lang.org/ruby.git/commit/?id=578bacc471 From 578bacc471fa3fa14f8607fe67adccce21e81657 Mon Sep 17 00:00:00 2001 From: nagachika <nagachika@r...> Date: Sat, 25 Jul 2020 21:42:20 +0900 Subject: merge revision(s) 5e81e8675a020ecd493620a4ff38db8fcf4b972a: [Backport #16780] Ignore exceptions when closing data connections [Bug #16780] Patch by koshigoe (Masataka SUZUKI). Thanks! diff --git a/lib/net/ftp.rb b/lib/net/ftp.rb index d1e545c..610027d 100644 --- a/lib/net/ftp.rb +++ b/lib/net/ftp.rb @@ -634,9 +634,9 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L634 while data = conn.read(blocksize) yield(data) end - conn.shutdown(Socket::SHUT_WR) + conn.shutdown(Socket::SHUT_WR) rescue nil conn.read_timeout = 1 - conn.read + conn.read rescue nil ensure conn.close if conn end @@ -659,9 +659,9 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L659 while line = conn.gets yield(line.sub(/\r?\n\z/, ""), !line.match(/\n\z/).nil?) end - conn.shutdown(Socket::SHUT_WR) + conn.shutdown(Socket::SHUT_WR) rescue nil conn.read_timeout = 1 - conn.read + conn.read rescue nil ensure conn.close if conn end @@ -688,9 +688,9 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L688 conn.write(buf) yield(buf) if block_given? end - conn.shutdown(Socket::SHUT_WR) + conn.shutdown(Socket::SHUT_WR) rescue nil conn.read_timeout = 1 - conn.read + conn.read rescue nil ensure conn.close if conn end @@ -724,9 +724,9 @@ module Net https://github.com/ruby/ruby/blob/trunk/lib/net/ftp.rb#L724 conn.write(buf) yield(buf) if block_given? end - conn.shutdown(Socket::SHUT_WR) + conn.shutdown(Socket::SHUT_WR) rescue nil conn.read_timeout = 1 - conn.read + conn.read rescue nil ensure conn.close if conn end diff --git a/version.h b/version.h index c92be32..a53458d 100644 --- a/version.h +++ b/version.h @@ -2,7 +2,7 @@ https://github.com/ruby/ruby/blob/trunk/version.h#L2 # define RUBY_VERSION_MINOR RUBY_API_VERSION_MINOR #define RUBY_VERSION_TEENY 1 #define RUBY_RELEASE_DATE RUBY_RELEASE_YEAR_STR"-"RUBY_RELEASE_MONTH_STR"-"RUBY_RELEASE_DAY_STR -#define RUBY_PATCHLEVEL 111 +#define RUBY_PATCHLEVEL 112 #define RUBY_RELEASE_YEAR 2020 #define RUBY_RELEASE_MONTH 7 -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/