diff options
Diffstat (limited to 'packages/meshbay-hub/src/meshbay_hub/static/node-page.js')
| -rw-r--r-- | packages/meshbay-hub/src/meshbay_hub/static/node-page.js | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/packages/meshbay-hub/src/meshbay_hub/static/node-page.js b/packages/meshbay-hub/src/meshbay_hub/static/node-page.js index bc22cbd..674779b 100644 --- a/packages/meshbay-hub/src/meshbay_hub/static/node-page.js +++ b/packages/meshbay-hub/src/meshbay_hub/static/node-page.js @@ -501,7 +501,15 @@ export function NodePage({ groups, token, username }) { setSavingSettings(true); setActionMsg(''); try { - await nodeOp('setNodeSettings', { settings: editSettings }); + // What was changed, and nothing else. Sending the whole form stored every + // setting the operator had not touched as a choice, in the roster and in + // node.toml, so no later default ever reached that node again: one + // saved stream cap kept connection_processes at 1 for good. + const changed = Object.fromEntries(Object.entries(editSettings).filter( + ([k, v]) => JSON.stringify(v) !== JSON.stringify((nodeSettings || {})[k]))); + if (Object.keys(changed).length) { + await nodeOp('setNodeSettings', { settings: changed }); + } setNodeSettings({ ...editSettings }); setActionMsg(t('node.settings_saved')); } catch (err) { @@ -509,7 +517,7 @@ export function NodePage({ groups, token, username }) { } finally { setSavingSettings(false); } - }, [editSettings]); + }, [editSettings, nodeSettings]); const saveStun = useCallback(async () => { if (!editStun) return; |