make sure we close sockets

bug/bundler_fix
David Maloney 2013-03-04 16:34:29 -06:00
parent 13ad5cf150
commit 12201c519a
1 changed files with 17 additions and 0 deletions

View File

@ -76,6 +76,10 @@ class Scanner
)
rescue ::Exception => e
return :rejected
ensure
if scan_client
scan_client.close
end
end
return :accepted
end
@ -92,6 +96,10 @@ class Scanner
)
rescue ::Exception => e
return :rejected
ensure
if scan_client
scan_client.close
end
end
return :accepted
end
@ -114,7 +122,12 @@ class Scanner
)
rescue ::Exception => e
return :rejected
ensure
if scan_client
scan_client.close
end
end
return :accepted
end
@ -142,6 +155,10 @@ class Scanner
end
rescue ::Exception => e
return nil
ensure
if scan_client
scan_client.close
end
end
end