MCPcopy Create free account
hub / github.com/anchordotdev/cli / Close

Method Close

diagnostic/server.go:93–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

91}
92
93func (s *Server) Close() error {
94 if err := s.ln.Close(); err != nil {
95 return err
96 }
97
98 if err := s.proxy.Close(); err != nil {
99 return err
100 }
101
102 ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond)
103 defer cancel()
104
105 if err := s.server.Shutdown(ctx); err != nil {
106 return err
107 }
108 if err := s.server.Close(); err != nil {
109 return err
110 }
111
112 if err := s.errg.Wait(); err != nil {
113 return err
114 }
115
116 return s.proxy.Wait()
117}
118
119func (s *Server) getCertificate(chi *tls.ClientHelloInfo) (*tls.Certificate, error) {
120 <-s.tlsc

Callers 12

TestMainFunction · 0.45
writeCAFileFunction · 0.45
TestMainFunction · 0.45
performMethod · 0.45
TestMainFunction · 0.45
TestMainFunction · 0.45
TestVerifyFunction · 0.45
TestVerifyErrorsFunction · 0.45
TestMainFunction · 0.45
AppendToFileMethod · 0.45
ReadFileMethod · 0.45

Calls 1

WaitMethod · 0.65

Tested by 8

TestMainFunction · 0.36
TestMainFunction · 0.36
TestMainFunction · 0.36
TestMainFunction · 0.36
TestVerifyFunction · 0.36
TestVerifyErrorsFunction · 0.36
TestMainFunction · 0.36