MCPcopy Create free account
hub / github.com/DoNewsCode/core / CloseConn

Method CloseConn

di/factory.go:109–115  ·  view source on GitHub ↗

CloseConn closes a specific connection in the factory.

(name string)

Source from the content-addressed store, hash-verified

107
108// CloseConn closes a specific connection in the factory.
109func (f *Factory) CloseConn(name string) {
110 if value, loaded := f.cache.LoadAndDelete(name); loaded {
111 if value.(Pair).Closer != nil {
112 value.(Pair).Closer()
113 }
114 }
115}

Callers 2

TestFactoryFunction · 0.95
TestFactory_nilCloserFunction · 0.95

Calls

no outgoing calls

Tested by 2

TestFactoryFunction · 0.76
TestFactory_nilCloserFunction · 0.76