summaryrefslogtreecommitdiff
path: root/lib/custodian/protocol-tests/smtp.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/custodian/protocol-tests/smtp.rb')
-rwxr-xr-xlib/custodian/protocol-tests/smtp.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/custodian/protocol-tests/smtp.rb b/lib/custodian/protocol-tests/smtp.rb
index 6a3895d..5da672f 100755
--- a/lib/custodian/protocol-tests/smtp.rb
+++ b/lib/custodian/protocol-tests/smtp.rb
@@ -81,11 +81,11 @@ class SMTPTest
socket.puts( "QUIT")
banner = socket.gets(nil)
- banner = banner[0,40]
+ banner = banner[0,40] unless( banner.nil? )
socket.close()
- if ( banner =~ /SMTP/i )
+ if ( ( !banner.nil? ) && ( banner =~ /SMTP/i ) )
puts "SMTP alive: #{banner}" if ( @test_data['verbose'] )
return true
else