Skip to content

Commit

Permalink
Merge pull request #548 from hpi-swt2/dev
Browse files Browse the repository at this point in the history
Update Master
  • Loading branch information
krichly committed May 3, 2019
2 parents 7b0c6b5 + 22d7846 commit 81dab7a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion app/api/v_sphere/connection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,15 @@ def initialize_settings

def connect
return unless configured?
create_connection if @vim.nil?

# only create new connection if there is no other valid, because otherwise it will allocate more and more tcp
# connections until it is not possible to create more and thus the server will throw an error
create_connection if @vim.nil? || !connected?
end

# currentSession is nil if session does not exist, e.g. because it disconnected
def connected?
!@vim.serviceContent.sessionManager.currentSession.nil?
end

def create_connection
Expand Down
2 changes: 1 addition & 1 deletion config/deploy/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,4 @@
set :slack_emoji, ':production:' # will be used as the avatar for the message
set :slack_stage, 'master'

set :base_url, 'https://hart.epic-hpi.de'
set :base_url, 'vm-swt-hrmt-master.eaalab.hpi.uni-potsdam.de'

0 comments on commit 81dab7a

Please sign in to comment.