See #434. Some libraries used the wrong exception class

git-svn-id: file:///home/svn/framework3/trunk@7325 4d416f70-5f16-0410-b530-b9f4589650da
unstable
HD Moore 2009-11-02 18:20:02 +00:00
parent e067823372
commit 1b5cc24eab
4 changed files with 205 additions and 201 deletions

View File

@ -147,7 +147,7 @@ module Handler
begin
session = session_waiter_event.wait(t)
rescue ::TimeoutError
rescue ::Timeout::Error
end
# If a connection has arrived, wait longer...
@ -241,3 +241,4 @@ end
# The default none handler
require 'msf/core/handler/none'

View File

@ -108,7 +108,7 @@ module Comm
# interested in.
begin
@@read_event.wait(15)
rescue TimeoutError
rescue Timeout::Error
client.send_response(Rex::Proto::Http::Response::OK.new)
return
end
@ -151,3 +151,4 @@ end
end
end
end

View File

@ -1150,7 +1150,7 @@ module Net # :nodoc:
end
end
return [buffer,["",@config[:port],ns.to_s,ns.to_s]]
rescue TimeoutError
rescue Timeout::Error
@logger.warn "Nameserver #{ns} not responding within TCP timeout, trying next one"
next
ensure
@ -1173,7 +1173,7 @@ module Net # :nodoc:
ans = socket.recvfrom(@config[:packet_size])
end
break if ans
rescue TimeoutError
rescue Timeout::Error
@logger.warn "Nameserver #{ns} not responding within UDP timeout, trying next one"
next
end
@ -1218,3 +1218,4 @@ end
class Hash # :nodoc:
include ExtendHash
end

View File

@ -92,7 +92,7 @@ class Console
def run_command(dispatcher, method, arguments)
begin
super
rescue TimeoutError
rescue Timeout::Error
log_error("Operation timed out.")
rescue RequestError => info
log_error(info.to_s)
@ -125,3 +125,4 @@ end
end
end
end