MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / close

Method close

internal/pluginhost/stream_bridge.go:78–93  ·  view source on GitHub ↗
(id string, errorMessage string)

Source from the content-addressed store, hash-verified

76}
77
78func (b *streamBridge) close(id string, errorMessage string) {
79 if b == nil || id == "" {
80 return
81 }
82 b.mu.Lock()
83 chunks := b.streams[id]
84 delete(b.streams, id)
85 b.mu.Unlock()
86 if chunks == nil {
87 return
88 }
89 if errorMessage != "" {
90 chunks <- pluginapi.ExecutorStreamChunk{Err: fmt.Errorf("%s", errorMessage)}
91 }
92 close(chunks)
93}

Callers 5

openMethod · 0.95
callHostStreamCloseMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected