-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RPC is being discarded if non-hosts aren't ready when the host invokes the method #6
Comments
Since the issue is not RPCs being received, but instead just not having anywhere to go after being received, I think a client side ordered buffer for RPCs would be a good solution - and then the buffered RPCs can be fired when the object is registered that matches their signature. |
My only concern with buffering the RPC actions up until it's ready is, what's a safe way of doing this without making it prone to a DOS? |
I don't really see how this would make anyone more viable to a DOS than just spamming them with valid RPCs? And waiting for the networked object to finish spawning is what the buffered RPC solution would be doing. |
Nevermind scratch what I said about that, I was just thinking about a more naive solution. If there's a reliable way to wait for a photon network object to be ready on a client, that sounds like the way to go |
The problem
If an RPC method is called from the host while the client isn't ready (the object doesn't exist yet), the RPC call is discarded.
What I expect to happen
If the object doesn't exist on a non-host's client, I'd expect it to still eventually work.
My guess at a naive fix to this is to implement some sort of retry mechanism. One issue however, is the fact that in this case it needs to trust other clients are just trying to invoke an RPC method on a game object that isn't ready yet.
If it takes in every request and retries for awhile, clients are prone to being DOS'ed.
What actually happens
The RPC call gets discarded.
How do I reproduce this issue?
git clone https://github.com/qwbarch/cw-rpc-reproducible
cd cw-rpc-reproducible && dotnet build FooBar.csproj
Assuming you have
UnityExplorer
, head down the ship on two clients and then spawn an enemy manually by doing the following (via the host):C# console
.MonsterSpawner.SpawnMonster("zombe")
, and then pressctrl + r
to spawn the enemy.You will notice two things on the non-host client.
Naturally spawned enemies throw a
mod id was not found
exception:The manually spawned enemy (via unity explorer) results in a dropped RPC message:
The text was updated successfully, but these errors were encountered: