From 7bace8a793c96dd60c8624200ca16d0ced1475a6 Mon Sep 17 00:00:00 2001 From: Javi Fontan Date: Thu, 19 Jan 2012 17:00:26 +0100 Subject: [PATCH] bug #1064: close connection after action finishes (VMM) --- src/mad/ruby/ssh_stream.rb | 4 ++++ src/vmm_mad/exec/one_vmm_exec.rb | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/mad/ruby/ssh_stream.rb b/src/mad/ruby/ssh_stream.rb index f4ac1da47d..42ada93462 100644 --- a/src/mad/ruby/ssh_stream.rb +++ b/src/mad/ruby/ssh_stream.rb @@ -193,6 +193,10 @@ class SshStreamCommand < RemotesCommand return self end + + def close + @stream.close + end end diff --git a/src/vmm_mad/exec/one_vmm_exec.rb b/src/vmm_mad/exec/one_vmm_exec.rb index e26787c032..3570203cef 100755 --- a/src/vmm_mad/exec/one_vmm_exec.rb +++ b/src/vmm_mad/exec/one_vmm_exec.rb @@ -94,6 +94,9 @@ class VmmAction def run(steps, info_on_success = nil) result = execute_steps(steps) + @ssh_src.close if @ssh_src + @ssh_dst.close if @ssh_dst + #Prepare the info for the OpenNebula core if DriverExecHelper.failed?(result) info = @data[:failed_info]