[rabbitmq-discuss] Connections loses its only channel,	websocket doesn't close
    Michael Klishin 
    mklishin at gopivotal.com
       
    Mon Mar  3 12:03:29 GMT 2014
    
    
  
On 25 Feb 2014, at 11:21, Nikita Tsukanov <keks9n at gmail.com> wrote:
> vhost "bugcheck" access rights for user "guest":
> 
> Configure: .* 
> Write: ^none$
> Read: .*
> 
> Script:
> 
> <html>
> <head>
> 
> 
> <script src="http://cdn.sockjs.org/sockjs-0.3.min.js"></script>
> <script src="stomp.js"></script>
> <script>
> 
>     var ws = new SockJS('http://127.0.0.1:15674/stomp');
>     var client = Stomp.over(ws);
>     var on_connect = function() {
>         console.log('connected');
>         client.send('/topic/test', {"content-type":"text/plain"}, "LALALA");
>     };
>     var on_error =  function() {
>         console.log('error');
>     };
>     client.connect('guest', 'guest', on_connect, on_error, 'bugcheck');
>     function send()
>     {
>         client.send('/topic/test', {"content-type":"text/plain"}, "LALALA");
>         return false;
>     }
> </script>
> </head>
> <body><a href="javascript:send();"</body>
> </html>
Some investigation results I have so far:
 * STOMP 1.1 spec does not require servers to close network connection after
sending an ERROR command: http://stomp.github.io/stomp-specification-1.1.html#ERROR
 * STOMP 1.2 spec does: http://stomp.github.io/stomp-specification-1.2.html#ERROR
and stomp.js uses 1.1 by default:
https://github.com/jmesnil/stomp-websocket/blob/master/lib/stomp.js#L447
MK
Software Engineer, Pivotal/RabbitMQ
    
    
More information about the rabbitmq-discuss
mailing list