diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/net/imap.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/net/imap.rb b/lib/net/imap.rb index dc185183cd..bb6754c732 100644 --- a/lib/net/imap.rb +++ b/lib/net/imap.rb @@ -964,7 +964,7 @@ module Net @idle_done_cond.wait(timeout) @idle_done_cond = nil if @receiver_thread_terminating - raise Net::IMAP::Error, "connection closed" + raise @exception || Net::IMAP::Error.new("connection closed") end ensure unless @receiver_thread_terminating @@ -2268,8 +2268,13 @@ module Net def continue_req match(T_PLUS) - match(T_SPACE) - return ContinuationRequest.new(resp_text, @str) + token = lookahead + if token.symbol == T_SPACE + shift_token + return ContinuationRequest.new(resp_text, @str) + else + return ContinuationRequest.new(ResponseText.new(nil, ""), @str) + end end def response_untagged |