Use one client per thread, via a factory method, instead of a global.
[arvados.git] / apps / workbench / app / views / websocket / index.html.erb
index 85202b8662b83d104b3c5a35c9c312fa1850f515..d8053718772fbcd0f8140aa3d85887186983dd70 100644 (file)
@@ -18,7 +18,7 @@ putStuffThere = function (content) {
   $("#PutStuffHere").append(content + "<br>");
 };
 
-var dispatcher = new WebSocket('<%= $arvados_api_client.discovery[:websocketUrl] %>?api_token=<%= Thread.current[:arvados_api_token] %>');
+var dispatcher = new WebSocket('<%= arvados_api_client.discovery[:websocketUrl] %>?api_token=<%= Thread.current[:arvados_api_token] %>');
 dispatcher.onmessage = function(event) {
   //putStuffThere(JSON.parse(event.data));
   putStuffThere(event.data);