MCPcopy
hub / github.com/etcd-io/etcd / Stop

Method Stop

tests/framework/e2e/cluster_proxy.go:140–163  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

138}
139
140func (pp *proxyProc) Stop() error {
141 if pp.proc == nil {
142 return nil
143 }
144 err := pp.proc.Stop()
145 if err != nil {
146 return err
147 }
148
149 err = pp.proc.Close()
150 if err != nil {
151 // proxy received SIGTERM signal
152 if !(strings.Contains(err.Error(), "unexpected exit code") ||
153 // v2proxy exits with status 1 on auto tls; not sure why
154 strings.Contains(err.Error(), "exit status 1")) {
155
156 return err
157 }
158 }
159 pp.proc = nil
160 <-pp.donec
161 pp.donec = make(chan struct{})
162 return nil
163}
164
165func (pp *proxyProc) Close() error { return pp.Stop() }
166

Callers 1

CloseMethod · 0.95

Calls 4

StopMethod · 0.65
CloseMethod · 0.65
ContainsMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected