Duplicate events in passenger, in websocket-rails -


i using phusion passenger version 4.0.35

my websocket_rails.rb file

websocketrails.setup |config|  config.log_level = :debug config.log_internal_events = false  if rails.env.production? config.standalone = true else config.standalone = false end config.synchronize = false end 

in normal controller using this

connection1 = websocketrails.users[one_user_id] connection1.send_message :online, @reply.to_json(:methods => required_methods) connection2 = websocketrails.users[another_other_user_id] connection2.send_message :online, @reply.to_json(:methods => required_methods) 

in client side

var socket_path = document.domain + ":3001" + '/websocket'  var dispatcher = new websocketrails(socket_path)  dispatcher.bind('online', function(data){ ................. .................................. } 

problem response twice while calling send_message on controller both th user gets response twice.

another thing works great in development in normal server mode runs on thin.

can please use .deliver function

actionmailer not delivering mail, rails 3 , let me know


Comments

Popular posts from this blog

html - Sizing a high-res image (~8MB) to display entirely in a small div (circular, diameter 100px) -

java - IntelliJ - No such instance method -

identifier - Is it possible for an html5 document to have two ids? -