clarify error handling when a channel cannot be opened

bug/bundler_fix
Brent Cook 2017-02-17 16:59:09 -06:00
parent 9db2cdb33a
commit 807a27e73d
1 changed files with 5 additions and 7 deletions

View File

@ -116,15 +116,13 @@ class Channel
begin
response = client.send_request(request)
cid = response.get_tlv_value(TLV_TYPE_CHANNEL_ID)
# Handle channel open failure exceptions
if cid.nil?
raise Rex::Post::Meterpreter::RequestError
end
end
if cid
# Create the channel instance
klass.new(client, cid, type, flags)
else
raise Rex::ConnectionRefused
end
# Create the channel instance
klass.new(client, cid, type, flags)
end
##