Answer the question
In order to leave comments, you need to log in
Why are websocket connections closed with code 1006?
Good afternoon.
I have the following configuration - Redis + Webdis on Debian 7 x32.
The problem is that after the first command is executed, all websocket connections are closed with code 1006. For example, we execute the following code:
function testJSON() {
var jsonSocket = new WebSocket("ws://ip:7379/.json");
jsonSocket.onopen = function() {
console.log("JSON socket connected!");
jsonSocket.send(JSON.stringify(["SET", "hello", "world"]));
jsonSocket.send(JSON.stringify(["GET", "hello"]));
};
jsonSocket.onmessage = function(messageEvent) {
console.log("JSON received:", messageEvent.data);
};
jsonSocket.onclose = function(messageEvent) {
//some logging
};
}
testJSON();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question