Disconnecting on subscribing/publishing
evll opened this issue · 1 comments
evll commented
I set up a websockets server locally running via wss and I can connect to it successfully:
websocket.on("socket/connect", function(session){
console.log('connected');
}
works as expected.
However, once I try
session.subscribe("chat", function(uri, payload){
console.log("Received message", payload.msg);
});
I am immediately disconnected. In Firefox the message is "Disconnected: Connection lost - scheduled 1th reconnect to occur in 5 second(s). With code 6"
From the server side the log display as follows:
17:36:15 DEBUG [websocket] INSERT CLIENT 897 ["user" => "s:36:"anon-8148039825a8aeeef50fab594866255";"] []
17:36:15 INFO [websocket] anon-8148039825a8aeeef50fab594866255 connected ["connection_id" => 897,"session_id" => "8148039825a8aeeef50fab594866255","storage_id" => 897] []
17:36:15 DEBUG [websocket] GET CLIENT 897 [] []
17:36:15 INFO [websocket] anon-8148039825a8aeeef50fab594866255 subscribe to chat [] []
17:36:20 DEBUG [websocket] INSERT CLIENT 894 ["user" => "s:37:"anon-12065318285a8aeeea4b641205203743";"] []
I added the respective topic with a name "chat" and registered it as a service with the correct tag.
Is there something I am missing here? Could it be that this problem is related to usage via SSL?
evll commented
Actually, it's probably more appropriate to open this issue here https://github.com/GeniusesOfSymfony/WebSocketBundle
Sorry, I will close this one.