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

Method Finalize

pkg/wshutil/wshrpc.go:747–757  ·  view source on GitHub ↗

if async, caller must call finalize

()

Source from the content-addressed store, hash-verified

745
746// if async, caller must call finalize
747func (handler *RpcResponseHandler) Finalize() {
748 // Always unregister the handler from the map, even if already done
749 if handler.reqId != "" {
750 handler.w.unregisterResponseHandler(handler.reqId)
751 }
752 if handler.done.Load() {
753 return
754 }
755 // SendResponse with done=true will call close() via defer, even when reqId is empty
756 handler.SendResponse(nil, true)
757}
758
759func (handler *RpcResponseHandler) IsDone() bool {
760 return handler.done.Load()

Callers 2

handleRequestInternalMethod · 0.95
serverImplAdapterFunction · 0.80

Calls 2

SendResponseMethod · 0.95

Tested by

no test coverage detected