aboutsummaryrefslogtreecommitdiffstats
path: root/lib/net/smtp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/net/smtp.rb')
-rw-r--r--lib/net/smtp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/net/smtp.rb b/lib/net/smtp.rb
index 359a0f9710..1302f3aa1d 100644
--- a/lib/net/smtp.rb
+++ b/lib/net/smtp.rb
@@ -567,7 +567,7 @@ module Net
ensure
unless @started
# authentication failed, cancel connection.
- s.close if s and not s.closed?
+ s.close if s
@socket = nil
end
end
@@ -613,7 +613,7 @@ module Net
ensure
@started = false
@error_occurred = false
- @socket.close if @socket and not @socket.closed?
+ @socket.close if @socket
@socket = nil
end