Proper use of NetDormancy

There are quite a few networked actors in my game and I was getting some high Net Tick Times. when they were checking for relevancy. The answer seemed to be net dormancy. As soon as I implemented it the net tick time dropped and all was good. That is until I went to interact with anything.

It seems that waking up an object is a bit more involved. In my constructor I set my actors to:

NetDormancy = ENetDormancy::DORM_Initial; 

When I say want to delete a block, I call a server function that deletes the block and that usually replicated down. Now it does not because the channel is dormant.

So instead I call

if (TargetActor)
{
        TargetActor->ForceNetUpdate();
        GetWorld()->DestroyActor(TargetActor);
}

I choose to use ForceNetUpdate because it internally calls FlushNetDormancy and sets the net update time so it should update next tick.

The problem is that this does not seem to wake up the channel. The server always destroys the actor but the client does not. Has anyone successfully used this?

So I’ve been looking into this more and can confirm that my connections are coming out of dormancy.

FNetworkObjectInfo* NetInfo = Actor->GetNetworkObjectInfo();
TSet<TWeakObjectPtr<UNetConnection>> DormConnections = NetInfo->DormantConnections;
TArray< TWeakObjectPtr<UNetConnection>> Connections = DormConnections.Array();

UE_LOG(LogTemp, Display, TEXT("%s has %d Dormant Connections"), *Actor->GetName(), DormConnections.Num());
for (int i = 0; i < Connections.Num(); i++)
{
	if (Connections.IsValidIndex(i))
	{
		UE_LOG(LogTemp, Display, TEXT("%s is Dormant"), *Connections[i]->GetName());
	}
}

Before I call TargetActor->ForceNetUpdate(); I get this output:

LogTemp: Display: RTile_46 has 2 Dormant Connections
LogTemp: Display: IpConnection_18 is Dormant
LogTemp: Display: IpConnection_19 is Dormant

After I call TargetActor->ForceNetUpdate(); and set it to AWAKE It outputs no dormant connections. Seems like a dormant connection is not the problem here. What could it be?

Hey, did you ever solve this?