From 19c9973a0d77b8347352ca97ced134915e81be36 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Thu, 17 Apr 2014 15:10:32 -0700 Subject: [PATCH] guests/linux: set a timeout on nc --- plugins/guests/linux/cap/port.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/guests/linux/cap/port.rb b/plugins/guests/linux/cap/port.rb index 62ffb5e7a..556127117 100644 --- a/plugins/guests/linux/cap/port.rb +++ b/plugins/guests/linux/cap/port.rb @@ -3,7 +3,7 @@ module VagrantPlugins module Cap class Port def self.port_open_check(machine, port) - machine.communicate.test("nc -z 127.0.0.1 #{port}") + machine.communicate.test("nc -z -w2 127.0.0.1 #{port}") end end end