Skip to content
This repository was archived by the owner on Jan 24, 2022. It is now read-only.

Commit d18f70c

Browse files
author
Jonathan Claudius
authored
Merge pull request #504 from secureCodeBox/add-missing-rescue
Add rescue for ENOPROTOOPT errors
2 parents 65051a9 + 414332a commit d18f70c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lib/ssh_scan/client.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ def connect()
7070
rescue Errno::EHOSTUNREACH => e
7171
@error = SSHScan::Error::ConnectionRefused.new(e.message)
7272
@sock = nil
73+
rescue Errno::ENOPROTOOPT => e
74+
@error = SSHScan::Error::ConnectionRefused.new(e.message)
75+
@sock = nil
7376
else
7477
if @raw_server_banner.nil?
7578
@error = SSHScan::Error::NoBanner.new(

0 commit comments

Comments
 (0)