The running() method sometimes seems to return an incorrect value, in which case the mgmt server start function [1] is not executed when it should be. The mgmt server startup function code also writes the flag file that controls daemon state. If the flag file is not present, the daemon does not think has entered management mode and loops incorrectly.
For now, I will simply run the methods to start/stop the mgmt server without checking the values first.
Before starting or stopping the mgmt server, the daemon checks the state with server.running(), for example here: https://github.com/CanonicalLtd/UCWifiConnect/blob/master/daemon/daemon.go#L99
The running() method sometimes seems to return an incorrect value, in which case the mgmt server start function [1] is not executed when it should be. The mgmt server startup function code also writes the flag file that controls daemon state. If the flag file is not present, the daemon does not think has entered management mode and loops incorrectly.
For now, I will simply run the methods to start/stop the mgmt server without checking the values first.
[1] https://github.com/CanonicalLtd/UCWifiConnect/blob/master/server/manager.go#L54