Skip to content

Commit bdea724

Browse files
committed
fix(build): capture streamExperts as local let before escaping health route closure
1 parent ded317e commit bdea724

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Sources/mlx-server/Server.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,6 +441,7 @@ struct MLXServer: AsyncParsableCommand {
441441
}
442442

443443
// Health (enhanced v3 with memory + stats + partition plan)
444+
let isSSDStream = self.streamExperts // capture before escaping closure
444445
router.get("/health") { _, _ -> Response in
445446
let activeMemMB = Memory.activeMemory / (1024 * 1024)
446447
let peakMemMB = Memory.peakMemory / (1024 * 1024)
@@ -451,7 +452,7 @@ struct MLXServer: AsyncParsableCommand {
451452
// Build partition info string
452453
var partitionJson = ""
453454
if let plan = partitionPlan {
454-
let isSSD = streamExperts
455+
let isSSD = isSSDStream
455456
var pData: [String: Any] = [
456457
"strategy": isSSD ? "ssd_streaming" : plan.strategy.rawValue,
457458
"overcommit_ratio": round(plan.overcommitRatio * 100) / 100,

0 commit comments

Comments
 (0)