MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / NextResponse

Method NextResponse

pkg/wshutil/wshrpc.go:593–608  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

591}
592
593func (handler *RpcRequestHandler) NextResponse() (any, error) {
594 var resp *RpcMessage
595 if handler.cachedResp != nil {
596 resp = handler.cachedResp
597 handler.cachedResp = nil
598 } else {
599 resp = <-handler.respCh
600 }
601 if resp == nil {
602 return nil, errors.New("response channel closed")
603 }
604 if resp.Error != "" {
605 return nil, errors.New(resp.Error)
606 }
607 return resp.Data, nil
608}
609
610func (handler *RpcRequestHandler) finalize() {
611 handler.callContextCancelFn()

Callers 2

SendRpcRequestMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected