Skip to content

Commit

Permalink
Merge pull request ManageIQ#512 from agrare/handle_nil_svc_drb_remote…
Browse files Browse the repository at this point in the history
…_invoker_with_server

Handle a nil svc in DrbRemoteInvoker#with_server

(cherry picked from commit c45a3e0)
  • Loading branch information
Fryguy committed Nov 4, 2022
1 parent 9bb6efa commit f17fec5
Showing 1 changed file with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ def with_server(inputs, bodies, method_name, script_info)
setup if num_methods.zero?
self.num_methods += 1
svc = MiqAeMethodService::MiqAeService.new(@workspace, inputs)
yield build_method_content(bodies, method_name, svc.object_id, script_info)
begin
yield build_method_content(bodies, method_name, svc.object_id, script_info)
ensure
svc.destroy # Reset inputs to empty to avoid storing object references
end
ensure
svc.destroy # Reset inputs to empty to avoid storing object references
self.num_methods -= 1
teardown if num_methods.zero?
end
Expand Down

0 comments on commit f17fec5

Please sign in to comment.