This commit is contained in:
mr
2026-04-29 07:47:44 +02:00
parent 6a3ce4a35b
commit c03b43f844
11 changed files with 194 additions and 58 deletions

View File

@@ -63,7 +63,7 @@ func (o *GeneralController) GetAll() {
o.ServeJSON()
}
func Websocket(ctx context.Context, user string, groups []string, dataType int, conn *websocket.Conn) {
func Websocket(ctx context.Context, user string, groups []string, dataType int, conn *websocket.Conn, extend ...string) {
defer conn.Close()
done := make(chan struct{})
go func() {
@@ -80,6 +80,8 @@ func Websocket(ctx context.Context, user string, groups []string, dataType int,
close(ch)
infrastructure.SearchMu.Lock()
delete(infrastructure.SearchStream, user)
delete(infrastructure.SearchStreamSeen, user)
delete(infrastructure.SearchStreamExtend, user)
infrastructure.SearchMu.Unlock()
}
fmt.Println("CLOSE !")