add option to wait for network on startup #11335
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Makes Kodi wait for a network interface to become available on startup.
Description
This is a successor to #11277 which made Kodi wait for network after waking up. As requested, this PR also makes Kodi wait right on startup for a network interface.
Please review especially:
CNetwork::WaitForNet
inCApplication::Initialize
at the right place? It is important to do before the database initialization I think, but should it be afterg_peripherals.Initialise()
?powermanagement.waitfornetwork
. Maybe it should better be now something likenetwork.waitfornetwork
as it is not specifc to waking up now anymore?Motivation and Context
When using MySQL it often is a problem that the network interface is not available yet when Kodi starts and then fails to initialize the database because of the missing connection to MySQL.
How Has This Been Tested?
I started Kodi several times and observed the log outputs.
Types of change
Checklist: