Close SSH session before exiting
This commit is contained in:
@@ -2,6 +2,7 @@ module Producer
|
||||
module Core
|
||||
class Remote
|
||||
attr_reader :hostname
|
||||
attr_writer :session
|
||||
|
||||
def initialize(hostname)
|
||||
@hostname = hostname
|
||||
@@ -43,6 +44,10 @@ module Producer
|
||||
def environment
|
||||
Environment.new_from_string(execute 'env')
|
||||
end
|
||||
|
||||
def cleanup
|
||||
session.close if @session
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user