Skip to content

Commit e3a936f

Browse files
committed
Allways return a port, either generated or specified
1 parent 5b9cb32 commit e3a936f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/vagrant-cloudstack/action/run_instance.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ def create_randomport_forwarding_rule(env, rule, randomrange, filename)
364364
end
365365
end
366366
end
367-
return rule[:publicport] if pf_public_port.nil?
367+
pf_public_port.nil? ? (return rule[:publicport]) : (return pf_public_port)
368368
end
369369

370370
def store_ssh_keypair(env, domain_config, keyname, account = nil, domainid = nil, projectid = nil)

0 commit comments

Comments
 (0)