Why cockpit is not restarted

I was always wondering why nethserver-cockpit-update doesn’t restart the cockpit service, I think we could have an issue here and probably with all cockpit modules we have

cc @dev_team

cockpit-ws doesn’t need restart because it is started on demand by systemd socket activation and it is stopped after 30secs the last user session ends.

ok but what it could occur if

you have the UI displayed on your browser tab
you update by another tab or by the terminal
you save the UI

I bet you have a error

In any case restarting the web server does not solve the issue because the old code is in the browser. A full page reload on the browser side is needed instead.

if cockpit is restarted, you have to log again in the remote browser page… I do it several time by day when I code ???

to be clear I mean

systemctl restart cockpit

Yes a cockpit restart closes the underlying web socket connection which in turn ends the session after a few seconds. But cockpit restart should never happen.

except for this

You usually update with Applications: when you go back to System the new page should be returned…