diff options
author | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-06 13:57:10 +0000 |
---|---|---|
committer | shugo <shugo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-02-06 13:57:10 +0000 |
commit | 69c3348b7997cb5efc2bf55bb11ea32dc976dcba (patch) | |
tree | 739478b58e132ddd7f112d75397e2cc5fa76f46d /lib/net | |
parent | bc885aeae60d6e00a4de3852640221c30c685ed1 (diff) | |
download | ruby-69c3348b7997cb5efc2bf55bb11ea32dc976dcba.tar.gz |
* lib/net/imap.rb (receive_responses): does not hang when an unexpected BYE
response received. fixed [ruby-core:27944]. Thanks, Bob Potter.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/net')
-rw-r--r-- | lib/net/imap.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb index 3a8145e03c..980fed61ca 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -1017,7 +1017,8 @@ module Net end def receive_responses - while true + connection_closed = false + until connection_closed synchronize do @exception = nil end @@ -1054,7 +1055,7 @@ module Net if resp.name == "BYE" && @logout_command_tag.nil? @sock.close @exception = ByeResponseError.new(resp) - break + connection_closed = true end when ContinuationRequest @continuation_request_arrival.signal |