-
Notifications
You must be signed in to change notification settings - Fork 119
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
Delay execution of dispatched events #359
Comments
@piranna The dispatchEvent function is already called with the delay helper in the websocket. The server event can be called with delay manually in your code. |
Just the part of the server event. I don't want to provide a manual delay on my code, I want the listeners to be executed at least in the next event loop when they are dispatched, not in the same one. This allows me to register some events in the WebSocket, as I would do normally in real code. |
Make sense, you can create a PR, but add the delay in the server's methods where it's needed, not in the dispatchEvent; |
I think the server method is |
All the events inside the library are going through |
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch
[email protected]
for the project I'm working on.Events from server to client needs to have some delay to mimic network delay.
Here is the diff that solved my problem:
This issue body was partially generated by patch-package.
The text was updated successfully, but these errors were encountered: