mirror of https://github.com/hashicorp/consul
agent: Adding a check for GOMAXPROCS. Fixes #10.
parent
13af774cb9
commit
3a5b8feb4a
|
@ -10,6 +10,7 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"runtime"
|
||||||
"strings"
|
"strings"
|
||||||
"syscall"
|
"syscall"
|
||||||
"time"
|
"time"
|
||||||
|
@ -189,6 +190,11 @@ func (c *Command) Run(args []string) int {
|
||||||
}
|
}
|
||||||
c.args = args
|
c.args = args
|
||||||
|
|
||||||
|
// Check GOMAXPROCS
|
||||||
|
if runtime.GOMAXPROCS(0) == 1 {
|
||||||
|
c.Ui.Error("WARNING: It is highly recommended to set GOMAXPROCS higher than 1")
|
||||||
|
}
|
||||||
|
|
||||||
// Setup the log outputs
|
// Setup the log outputs
|
||||||
logGate, logWriter, logOutput := c.setupLoggers(config)
|
logGate, logWriter, logOutput := c.setupLoggers(config)
|
||||||
if logWriter == nil {
|
if logWriter == nil {
|
||||||
|
|
Loading…
Reference in New Issue