Changeset 287

Show
Ignore:
Timestamp:
12/18/07 09:09:50 (8 months ago)
Author:
gethema..@gmail.com
Message:

fix the error when trying to send data to client, when he is disconneted

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/framework/meta_pimp.rb

    r275 r287  
    5656      callback.invoke(data_options) 
    5757    elsif client_signature = data_options[:client_signature] 
    58       reactor.connections[client_signature].instance.worker_receive(data_options) 
     58      # method writes to the tcp master connection loop 
     59      begin 
     60        reactor.connections[client_signature].instance.worker_receive(data_options) 
     61      rescue 
     62        puts "Error sending message back to client, it got disconnected" 
     63      end 
    5964    end 
    6065  end 
  • trunk/test/meta_worker_test.rb

    r269 r287  
    2020    ActiveRecord::Base.connection.current_database.should == "rails_sandbox_production" 
    2121  end 
     22 
    2223  xspecify "load appropriate schedule from config file" do 
    2324