From 34f44ca496108c98d05cf2338e36fa66bc362255 Mon Sep 17 00:00:00 2001 From: aamine Date: Wed, 25 Oct 2000 17:40:30 +0000 Subject: aamine * lib/net/protocol.rb: Command#critical_ok * lib/net/smtp.rb: clear critical flag before go to SMTP git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/protocol.rb | 9 +++++++-- lib/net/smtp.rb | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/net/protocol.rb b/lib/net/protocol.rb index 237c4a116a..8aca2ef2d6 100644 --- a/lib/net/protocol.rb +++ b/lib/net/protocol.rb @@ -402,9 +402,9 @@ module Net def critical return if @critical @critical = true - r = yield + ret = yield @critical = false - r + ret end def critical? @@ -421,6 +421,11 @@ module Net @critical = false end + def critical_ok + @critical = false + end + public :critical_ok + end diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb index 4ea9a2f221..33fc41e42a 100644 --- a/lib/net/smtp.rb +++ b/lib/net/smtp.rb @@ -146,6 +146,7 @@ module Net rescue ProtocolError if @esmtp then @esmtp = false + @command.critical_ok retry else raise -- cgit v1.2.3