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

Update index.js #1

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

Conversation

khuramzahid
Copy link

@Clement-Jean I have tried running this code on my machine. I was having issues until I moved the client.close() command inside the callback function as shown. Please review.

@Clement-Jean
Copy link
Owner

Could you please describe the "issues" you were having?

@khuramzahid
Copy link
Author

@Clement-Jean I tried running the code as it is, but it was not displaying the message received from the server. Based on my understanding, because it takes some time for the server to execute the RPC method, and the client executes close() function synchronously, it was not giving time to the client to wait for the RPC execution and getting closed before that.

@Clement-Jean
Copy link
Owner

Clement-Jean commented May 31, 2024

@khuramzahid So, we actually don't need this client.close(). I was probably being too cautious. Could you remove it in greet and all the other client/index.js?

edit

make sure to git pull before doing the edits

@khuramzahid
Copy link
Author

@Clement-Jean Sure. I am currently following the Udemy course. As soon as I am done with the course, I will push another commit to my forked repo and update this Pull Request.

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.

2 participants