Dont duplicate interfaces on port change 2.0
This commit is contained in:
@@ -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
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user