MCPcopy Create free account
hub / github.com/docker/secrets-engine / waitForClientToDisconnect

Function waitForClientToDisconnect

x/ipc/ipc.go:160–174  ·  view source on GitHub ↗
(logger logging.Logger, s *yamux.Session, t time.Duration)

Source from the content-addressed store, hash-verified

158}
159
160func waitForClientToDisconnect(logger logging.Logger, s *yamux.Session, t time.Duration) {
161 timeout := time.After(t)
162 for {
163 select {
164 case <-time.After(50 * time.Millisecond):
165 case <-timeout:
166 logger.Printf("Timeout expired but %d streams still open, shutting down server...", s.NumStreams())
167 return
168 }
169 streams := s.NumStreams()
170 if streams <= 0 {
171 return
172 }
173 }
174}
175
176func (i *ipcImpl) Close() error {
177 return i.teardown()

Callers 1

newMuxedIPCFunction · 0.85

Calls 1

PrintfMethod · 0.65

Tested by

no test coverage detected