Dont duplicate interfaces on port change 2.0

This commit is contained in:
2026-08-01 06:31:15 +03:00
parent bc0ef8c613
commit be3bebeb5b
2 changed files with 11 additions and 1 deletions
+10
View File
@@ -117,5 +117,15 @@ export const setInterfaces = sdk.setupInterfaces(async ({ effects }) => {
],
})
// Exported service interfaces are a SECOND registry, independent of the
// bindings above and with its own cleanup effect. Clearing bindings alone
// leaves an orphaned interface record behind, which the UI still lists — so
// a port change can produce two identical "Stratum" rows. Excluding
// 'stratum-tls' when TLS is off also removes that row when the user
// disables TLS, rather than leaving a dead endpoint on display.
await effects.clearServiceInterfaces({
except: ['ui', 'stratum', ...(ports?.tlsEnabled ? ['stratum-tls'] : [])],
})
return receipts
})