MCPcopy
hub / github.com/grpc/grpc-go / Close

Method Close

credentials/tls/certprovider/store.go:84–94  ·  view source on GitHub ↗

Close overrides the Close method of the embedded provider. It releases the reference held by the caller on the underlying provider and if the provider's reference count reaches zero, it is removed from the store, and its Close method is also invoked.

()

Source from the content-addressed store, hash-verified

82// provider's reference count reaches zero, it is removed from the store, and
83// its Close method is also invoked.
84func (wp *wrappedProvider) Close() {
85 ps := wp.store
86 ps.mu.Lock()
87 defer ps.mu.Unlock()
88
89 wp.refCount--
90 if wp.refCount == 0 {
91 wp.Provider.Close()
92 delete(ps.providers, wp.storeKey)
93 }
94}
95
96// Close overrides the Close method of the embedded provider to avoid release the
97// already released reference.

Callers

nothing calls this directly

Calls 3

CloseMethod · 0.65
LockMethod · 0.45
UnlockMethod · 0.45

Tested by

no test coverage detected