Skip to content

Commit

Permalink
[Nexus] Unregister standby acknowledgements after joining
Browse files Browse the repository at this point in the history
By default, Nexus expects will wait for all joined clients to
acknowledge standby notifications when using Nexus for going to standby.
It waits for those acknowledgments for some time (usually 10 secs)
before going to standby, which causes a large delay to complete standby
in case the clients don't acknowledge.

All plugins currently joining Nexus are, by default, not acknowledging
the standby, so they should call NxClient_UnregisterAcknowledgeStandby()
after joining so that Nexus doesn't wait for them when going to standby.

Make the NxClient_UnregisterAcknowledgeStandby() after NxClient_Join()
for all plugins currently joining Nexus and not doing any standby
acknowledgement.

Signed-off-by: Ricardo Silva <[email protected]>
  • Loading branch information
rjpdasilva committed Mar 2, 2020
1 parent 360b47d commit d005ac7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions DeviceIdentification/Implementation/Nexus/Nexus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ class DeviceImplementation : public Exchange::IDeviceProperties, public PluginHo
{
NEXUS_Error rc = NxClient_Join(NULL);
ASSERT(!rc);
NxClient_UnregisterAcknowledgeStandby(NxClient_RegisterAcknowledgeStandby());

if (rc == NEXUS_SUCCESS) {
NEXUS_Platform_GetConfiguration(&_platformConfig);
Expand Down
1 change: 1 addition & 0 deletions DisplayInfo/Nexus/PlatformImplementation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class DisplayInfoImplementation : public Exchange::IGraphicsProperties, public E

NEXUS_Error rc = NxClient_Join(NULL);
ASSERT(!rc);
NxClient_UnregisterAcknowledgeStandby(NxClient_RegisterAcknowledgeStandby());
NEXUS_Platform_GetConfiguration(&_platformConfig);

UpdateTotalGpuRam(_totalGpuRam);
Expand Down
1 change: 1 addition & 0 deletions RemoteControl/IRRemote.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ namespace Plugin {

rc = NxClient_Join(nullptr);
ASSERT(rc == NEXUS_SUCCESS);
NxClient_UnregisterAcknowledgeStandby(NxClient_RegisterAcknowledgeStandby());

NxClient_GetDefaultAllocSettings(&allocSettings);
allocSettings.inputClient = 1;
Expand Down
1 change: 1 addition & 0 deletions VolumeControl/Nexus/VolumeControlPlatform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class VolumeControlPlatformNexus : public VolumeControlPlatform {
NxClient_GetDefaultJoinSettings(&joinSettings);
snprintf(joinSettings.name, NXCLIENT_MAX_NAME, "%s", "wpevolumecontrol");
NxClient_Join(&joinSettings);
NxClient_UnregisterAcknowledgeStandby(NxClient_RegisterAcknowledgeStandby());
}

~VolumeControlPlatformNexus() override
Expand Down

0 comments on commit d005ac7

Please sign in to comment.