From 495a0557d1b0bd7e6c91b9ef7d410757e4352290 Mon Sep 17 00:00:00 2001 From: David Pelaez Date: Mon, 28 Apr 2014 21:43:01 -0500 Subject: [PATCH] Fix bug calculating a group's port In the original foreman, an increase of 100 defined the number of the first process of the next group, hence, a two type Procfile uses ports 5000 and 5100. Forego was correctly printing this expected numbers but line 86 was recalculating this port number again with a distance of 1000 not a hundred. The result was that I was seeing my second type of process listening on port 6000, not the expected 5100. --- start.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/start.go b/start.go index 2139168..931182a 100644 --- a/start.go +++ b/start.go @@ -83,7 +83,7 @@ func runStart(cmd *Command, args []string) { port := flagPort + (idx * 100) ps := NewProcess(proc.Command, env) processes[proc.Name] = ps - ps.Env["PORT"] = strconv.Itoa(flagPort + (idx * 1000)) + ps.Env["PORT"] = strconv.Itoa(port) ps.Root = filepath.Dir(flagProcfile) ps.Stdin = nil ps.Stdout = of.CreateOutlet(proc.Name, idx, false)