Ongoing task from earlier to refactor and clean up the connection handling of the daemon.
Make well-defined states for the logical connection, separate from individual OpenVPN process states, so that the client can recognize and display corner case states such as slow or interrupted connections. Never give up trying to reconnect, but reduce the frequency of attempts after a while.
Corner cases to keep an eye on in the future:
With a client left in 'on' mode but no reliable connection, the daemon will continue spawning new child process perpetually; any memory or resource leak will eventually lead to a crash.
Likewise, an unending sequence of subprocesses with logged stdout/err will result in unbounded log output; may have to implement log pruning.
Both of these are mitigated by introducing the concept of 'slow mode', making connection attempts less frequently if a certain time has passed without a successful connection.
Ongoing task from earlier to refactor and clean up the connection handling of the daemon.
Make well-defined states for the logical connection, separate from individual OpenVPN process states, so that the client can recognize and display corner case states such as slow or interrupted connections. Never give up trying to reconnect, but reduce the frequency of attempts after a while.
Corner cases to keep an eye on in the future:
Both of these are mitigated by introducing the concept of 'slow mode', making connection attempts less frequently if a certain time has passed without a successful connection.