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

Method start

coderd/workspaceagentsrpc.go:380–391  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

378}
379
380func (m *agentConnectionMonitor) start(ctx context.Context) {
381 ctx, m.cancel = context.WithCancel(ctx)
382 m.wg.Add(2)
383 go func(ctx context.Context) {
384 defer m.wg.Done()
385 m.sendPings(ctx)
386 }(ctx)
387 go func(ctx context.Context) {
388 defer m.wg.Done()
389 m.monitor(ctx)
390 }(ctx)
391}
392
393func (m *agentConnectionMonitor) monitor(ctx context.Context) {
394 reason := "disconnect"

Calls 4

sendPingsMethod · 0.95
monitorMethod · 0.95
AddMethod · 0.65
DoneMethod · 0.45

Tested by 1