Skip to content

Commit a97c558

Browse files
Merge pull request #138 from bheuvel/issue137/fix_static_pupport
Allways return a port, either generated or specified
2 parents 5b9cb32 + e3a936f commit a97c558

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)