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

fix misleading docs for enableLatencySim #3502

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TheArrowsmith
Copy link
Contributor

The docs for liveSocket.enableLatencySim seem misleading if not outright wrong:

The enableLatencySim function accepts an integer in milliseconds for the round-trip-time to the server.

"Round-trip time" means the total time taken for the signal to go from client to server then back again. I.e. if I set the latency sim to 5000 ms, I would expect that when I e.g. when I change something in an <input> it would take 5 seconds to see the result (e.g. error messages appearing on the form.)

But experimenting with this feature, it seems that the argument I submit to enableLatencySim is actually the one-way time, not the round-trip time. I.e. if I set it to 5000 ms then it takes 10 seconds to see the results of my actions, not 5.

I'm not sure what the actual intended behaviour is (I can't figure it out from a brief look at the JS source code) but the docs don't appear to match what actually happens. Submitting this minor doc change to make it consistent.

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

Successfully merging this pull request may close these issues.

1 participant