packer/rpc: Listen on 127.0.0.1 specifically to avoid hangs

This commit is contained in:
Mitchell Hashimoto 2013-07-01 09:31:55 -07:00
parent 5425aecaae
commit b773e8decd
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
## 0.1.3 (unreleased)
BUG FIXES:
* core: More plugin server fixes that avoid hangs on OS X 10.7 [GH-87]
## 0.1.2 (June 29, 2013)
IMPROVEMENTS:

View File

@ -20,7 +20,7 @@ func PortRange(min, max int) {
// bound to that port.
func netListenerInRange(min, max int) net.Listener {
for port := min; port <= max; port++ {
l, err := net.Listen("tcp", fmt.Sprintf(":%d", port))
l, err := net.Listen("tcp", fmt.Sprintf("127.0.0.1:%d", port))
if err == nil {
return l
}