1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-08-07 22:18:30 -04:00

cups: fix initialization race

port 1.5
This commit is contained in:
bbedward
2026-07-24 10:42:27 -04:00
parent 0815e48465
commit ea03fb2788
2 changed files with 69 additions and 35 deletions
+3 -2
View File
@@ -116,11 +116,12 @@ func RouteRequest(conn *models.Conn, req models.Request) {
}
if strings.HasPrefix(req.Method, "cups.") {
if cupsManager == nil {
mgr, err := ensureCupsManager()
if err != nil {
models.RespondError(conn, req.ID, "CUPS manager not initialized")
return
}
cups.HandleRequest(conn, req, cupsManager)
cups.HandleRequest(conn, req, mgr)
return
}