MCPcopy
hub / github.com/wavetermdev/waveterm / WaitForRegister

Method WaitForRegister

pkg/wshutil/wshrouter.go:399–411  ·  view source on GitHub ↗
(ctx context.Context, routeId string)

Source from the content-addressed store, hash-verified

397}
398
399func (router *WshRouter) WaitForRegister(ctx context.Context, routeId string) error {
400 for {
401 if router.getLinkForRoute(routeId) != nil {
402 return nil
403 }
404 select {
405 case <-ctx.Done():
406 return ctx.Err()
407 case <-time.After(30 * time.Millisecond):
408 continue
409 }
410 }
411}
412
413// this will never block, can be called while holding router.Lock
414func (router *WshRouter) queueUpstreamMessage(msgBytes []byte, debugStr string) {

Callers 5

WaitForRouteCommandMethod · 0.80
connectToJobManagerMethod · 0.80
StartConnServerMethod · 0.80
StartConnServerMethod · 0.80
doReconnectJobFunction · 0.80

Calls 2

getLinkForRouteMethod · 0.95
ErrMethod · 0.80

Tested by

no test coverage detected