This PR improves the time from App start or from manual server selection until the server is connected. Basically, this is done by two core changes:
Loading the last server in AppDelegates'sdidFinishLaunchingWithOptions before initializing the main controllers for iPad and iPhone.
Calling the heartbeat check method checkServer immediately before starting the repeating timer which calls checkServer.
Trigger restart of timer by notification once a new server was selected.
To be able to show the HostManagement popover on iPad (e.g. no last server is defined or last server cannot be connected) the tcpJSONRPC is started in viewDidAppear.
As we are now connecting faster, the heartbeat timer can use a lower frequency. The timer was increased 5 seconds, and the connection timeout error kicks in after 4 seconds. This gives more time to the server to deal with potential high load situations, before the App is throwing error messages and signals a disconnect.
The videos show start to connect, followed by selecting a new server.
Description
This PR improves the time from App start or from manual server selection until the server is connected. Basically, this is done by two core changes:
AppDelegates's
didFinishLaunchingWithOptions
before initializing the main controllers for iPad and iPhone.checkServer
immediately before starting the repeating timer which callscheckServer
.To be able to show the
HostManagement
popover on iPad (e.g. no last server is defined or last server cannot be connected) thetcpJSONRPC
is started inviewDidAppear
.As we are now connecting faster, the heartbeat timer can use a lower frequency. The timer was increased 5 seconds, and the connection timeout error kicks in after 4 seconds. This gives more time to the server to deal with potential high load situations, before the App is throwing error messages and signals a disconnect.
The videos show start to connect, followed by selecting a new server.
Summary for release notes
Improvement: Faster connect to Kodi server Improvement: More robust against connection loss in load situations on Kodi server