MCPcopy Index your code
hub / github.com/coder/coder / Close

Method Close

tailnet/test/peer.go:371–386  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

369}
370
371func (p *Peer) Close(ctx context.Context) {
372 p.t.Helper()
373 p.cancel()
374 for {
375 select {
376 case <-ctx.Done():
377 p.t.Errorf("timeout waiting for responses to close for %s", p.name)
378 return
379 case _, ok := <-p.resps:
380 if ok {
381 continue
382 }
383 return
384 }
385 }
386}
387
388func (p *Peer) UngracefulDisconnect(ctx context.Context) {
389 p.t.Helper()

Calls 4

HelperMethod · 0.65
cancelMethod · 0.45
DoneMethod · 0.45
ErrorfMethod · 0.45