Add a rescue to catch method missing for stage_payload
This allows us to provide a friendlier message to users when they are using a stageless listener with a staged payload.bug/bundler_fix
parent
72bde63397
commit
6523600952
|
@ -331,6 +331,7 @@ protected
|
|||
|
||||
resp['Content-Type'] = 'application/octet-stream'
|
||||
|
||||
begin
|
||||
# generate the stage, but pass in the existing UUID and connection id so that
|
||||
# we don't get new ones generated.
|
||||
blob = obj.stage_payload(
|
||||
|
@ -354,6 +355,10 @@ protected
|
|||
:ssl => ssl?,
|
||||
:payload_uuid => uuid
|
||||
})
|
||||
rescue NoMethodError
|
||||
print_error("Staging failed. This can occur when stageless listeners are used with staged payloads.")
|
||||
return
|
||||
end
|
||||
|
||||
when :connect
|
||||
print_status("#{cli.peerhost}:#{cli.peerport} (UUID: #{uuid.to_s}) Attaching orphaned/stageless session ...")
|
||||
|
|
Loading…
Reference in New Issue