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

Method NotifyDeletedUser

api/stream/stream.go:54–64  ·  view source on GitHub ↗

NotifyDeletedUser closes existing connections for the given user.

(userID uint)

Source from the content-addressed store, hash-verified

52
53// NotifyDeletedUser closes existing connections for the given user.
54func (a *API) NotifyDeletedUser(userID uint) error {
55 a.lock.Lock()
56 defer a.lock.Unlock()
57 if clients, ok := a.clients[userID]; ok {
58 for _, client := range clients {
59 client.Close()
60 }
61 delete(a.clients, userID)
62 }
63 return nil
64}
65
66// NotifyDeletedClient closes existing connections with the given token.
67func (a *API) NotifyDeletedClient(userID uint, token string) {

Callers 1

TestDeleteUserFunction · 0.80

Calls 1

CloseMethod · 0.45

Tested by 1

TestDeleteUserFunction · 0.64