diff options
author | Steve Kemp <steve@steve.org.uk> | 2012-11-21 23:52:00 +0000 |
---|---|---|
committer | Steve Kemp <steve@steve.org.uk> | 2012-11-21 23:52:00 +0000 |
commit | 3823a97a8acc189ef26f52cd0f079aed7975c360 (patch) | |
tree | c8a86941973a07627a733eb0f69a16d3681cb6ab | |
parent | cd03989635338038d5df19163f1976210dd42634 (diff) |
Make the banner-reading optional - for services that don't need it.
-rw-r--r-- | lib/custodian/protocoltest/tcp.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/custodian/protocoltest/tcp.rb b/lib/custodian/protocoltest/tcp.rb index 9806565..24389fe 100644 --- a/lib/custodian/protocoltest/tcp.rb +++ b/lib/custodian/protocoltest/tcp.rb @@ -129,7 +129,7 @@ class TCPTest < ProtocolTest # send the string "quit". # # - def run_test_internal( host, port, banner = nil ) + def run_test_internal( host, port, banner = nil, do_read = true ) begin timeout(30) do begin @@ -137,7 +137,8 @@ class TCPTest < ProtocolTest socket.puts( "QUIT") # read a banner from the remote server - read = socket.gets(nil) + read = nil + read = socket.gets(nil) if ( do_read ) # trim to a sane length & strip newlines. read = read[0,255] unless ( read.nil? ) |