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
failed to get response from server #45
Comments
By the way, if I use it works fine. |
Hi @XDinEuro |
Hi, thanks for the reply. I just changed the code to
Then it works. I think the reason is I shouldn't mix synchronous call and asynchronous call together. |
Yeap! // send request
await ws.open();
const response = await ws.sendRequest({ task: 'move_ptp' }, { requestId: 1 });
console.log("responsed");
console.log(response); |
Hi, I am using sendRequest() API, and always failed to get response even though I send it from server with same request id.
Here is the detailed code.
I have a server running behind, sending response with same message after 1 second receiving request.
When I run the code I only see the log in
onMessage
, but not in promise, and I didn't see "finished".I wonder, did I configure something wrong ? Or I didn't extract requestID from received message correctly ?
The text was updated successfully, but these errors were encountered: