Skip to content
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

Replying node.on.done on localhost might send msgs too early #168

Open
shakty opened this issue Aug 27, 2021 · 1 comment
Open

Replying node.on.done on localhost might send msgs too early #168

shakty opened this issue Aug 27, 2021 · 1 comment

Comments

@shakty
Copy link
Member

shakty commented Aug 27, 2021

Usecase:

client:

node.done();

server:

node.on.done('X', (msg) => node.say('next step or this step?');

If the server is fast and client is slow the message might arrive after the client is DONE but before the client has started the new step (the stepping procedure is async to let local listeners finish). In this case, the message belongs to the previous step. Vice versa the message will be fired on the next step.

If messages are critical to be fired in the next (e.g., sending the payoff for the game to EndScreen), it will fail.

@shakty
Copy link
Member Author

shakty commented Aug 27, 2021

Problem is perhaps specific to single-players with step-rule SOLO.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant