summaryrefslogtreecommitdiff
path: root/lib/net/imap.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/imap.rb')
-rw-r--r--lib/net/imap.rb5
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