Skip to content
This repository was archived by the owner on Jul 12, 2023. It is now read-only.

Support decode message from Buffer object#1

Open
progre wants to merge 1 commit into
Kurento:masterfrom
progre:decode-message-from-buffer
Open

Support decode message from Buffer object#1
progre wants to merge 1 commit into
Kurento:masterfrom
progre:decode-message-from-buffer

Conversation

@progre

@progre progre commented Mar 31, 2017

Copy link
Copy Markdown

This is PR to fix Kurento/bugtracker#116 .
It makes decoding message from Buffer object. It depends on the behavior is changed by version up of websocket-stream.

To use in Kurento-client-js, It should be merged at the same time;
KurentoForks/reconnect-ws#1

@agonza1

agonza1 commented May 24, 2019

Copy link
Copy Markdown

I tried both changes at the same time, the decoding seems to work fine but there is an unexpected behavior.
In some situations more than one JSON is sent to Kurento at the same time like:

kurento_1 | 0:00:12.528481475 1 0x7f8a7c0e9a40 DEBUG KurentoWebSocketTransport WebSocketTransport.cpp:427:processMessage: Message: {"jsonrpc":"2.0","method":"subscribe","params":{"object":"717845a1-027a-4eec-968f-485b8b1a8f86_kurento.MediaPipeline/e46d8a73-c325-4e0e-9aaf-4460d4ae6f1d_kurento.WebRtcEndpoint","type":"MediaStateChanged","sessionId":"16da30ec-249f-4c2a-80ea-32105fc3b676"},"id":30}{"jsonrpc":"2.0","method":"invoke","params":{"object":"717845a1-027a-4eec-968f-485b8b1a8f86_kurento.MediaPipeline/17fa6614-517e-499a-826e-645ff88a081f_kurento.WebRtcEndpoint","operation":"connect","operationParams":{"sink":"717845a1-027a-4eec-968f-485b8b1a8f86_kurento.MediaPipeline/e46d8a73-c325-4e0e-9aaf-4460d4ae6f1d_kurento.WebRtcEndpoint"},"sessionId":"16da30ec-249f-4c2a-80ea-32105fc3b676"},"id":31}

Kurento then grabs the first JSON object and leaves the rest out causing a timeout error.
I haven't discovered yet why this happens.

@jenkinskurento

Copy link
Copy Markdown
Contributor

Hi there, thanks for your Pull Request!

A Kurento member needs to verify that this patch is reasonable to test. In case it is, they should write a comment with the phrase test this please. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by Kurento members will still work. Regular contributors can be whitelisted to skip this step.

@agonza1

agonza1 commented May 28, 2019

Copy link
Copy Markdown

Update:
I had this consistently working with this changes of kurento-jsonrpc-js and this progre/reconnect-ws#1

Also npm audit of kurento-client-js returns 0 vulnerabilities

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

kurento-client always crashes on node.js >=6.3 (dependency bug)

3 participants