Open jjwallaby opened 7 years ago
Did you solve this
As a workaround add some sleep after Stomp.overWS
to allow establish the connection
It may because you used the client before connection is established, you can try to call client functions inside connectCallBack
(second parameter of the connect function) after connection has been established.
TypeError: Cannot read property 'sendUTF' of null. wrapWs function connection is set to null. line 62 stomp-node.js fails.
wrapWS = function(url) { var WebSocketClient, connection, socket, ws; WebSocketClient = require('websocket').client; connection = null; ws = { url: url, send: function(d) { return connection.sendUTF(d);
Example call :
when use stomp over WS var client = Stomp.overWS('ws://localhost:61614/stomp');