MCPcopy Index your code
hub / github.com/DarthSim/overmind / Start

Method Start

start/command_center.go:36–57  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

34}
35
36func (c *commandCenter) Start() (err error) {
37 if c.listener, err = net.Listen(c.Network, c.SocketPath); err != nil {
38 if c.Network == "unix" && strings.Contains(err.Error(), "address already in use") {
39 err = fmt.Errorf("it looks like Overmind is already running. If it's not, remove %s and try again", c.SocketPath)
40 }
41 return
42 }
43
44 go func(c *commandCenter) {
45 for {
46 if conn, err := c.listener.Accept(); err == nil {
47 go c.handleConnection(conn)
48 }
49
50 if c.stop {
51 break
52 }
53 }
54 }(c)
55
56 return nil
57}
58
59func (c *commandCenter) Stop() {
60 c.stop = true

Callers

nothing calls this directly

Calls 1

handleConnectionMethod · 0.95

Tested by

no test coverage detected