MCPcopy
hub / github.com/gotify/server / Close

Method Close

api/stream/stream.go:157–169  ·  view source on GitHub ↗

Close closes all client connections and stops answering new connections.

()

Source from the content-addressed store, hash-verified

155
156// Close closes all client connections and stops answering new connections.
157func (a *API) Close() {
158 a.lock.Lock()
159 defer a.lock.Unlock()
160
161 for _, clients := range a.clients {
162 for _, client := range clients {
163 client.Close()
164 }
165 }
166 for k := range a.clients {
167 delete(a.clients, k)
168 }
169}
170
171func uniq[T comparable](s []T) []T {
172 m := make(map[T]struct{}, len(s))

Callers 15

mainFunction · 0.45
RunFunction · 0.45
TearDownSuiteMethod · 0.45
Test_WithDefaultFunction · 0.45
AfterTestMethod · 0.45
AfterTestMethod · 0.45
AfterTestMethod · 0.45
AfterTestMethod · 0.45
AfterTestMethod · 0.45
AfterTestMethod · 0.45

Calls

no outgoing calls

Tested by 15

TearDownSuiteMethod · 0.36
Test_WithDefaultFunction · 0.36
AfterTestMethod · 0.36
AfterTestMethod · 0.36
AfterTestMethod · 0.36
AfterTestMethod · 0.36
AfterTestMethod · 0.36
AfterTestMethod · 0.36
uploadFunction · 0.36