Ticket #66 (assigned defect)

Opened 4 months ago

Last modified 4 months ago

set_comm_inactivity_timeout fails when called from initialize

Reported by: isak Assigned to: raggi (accepted)
Priority: minor Milestone:
Keywords: Cc:


Not sure if this really is a bug and worth changing, but did surprise me a little. Calling it from post_init works fine.

require 'rubygems'
require 'eventmachine'

class MyServer < EM::Protocols::SmtpServer
  def initialize(*args)
    self.set_comm_inactivity_timeout 240

EM.run do
  EM.start_server "", 2500, MyServer

Throws on connect:

/Library/Ruby/Gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:1510:in `set_comm_inactivity_timeout': can't convert nil into String (TypeError)
	from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:1510:in `set_comm_inactivity_timeout'
	from duh.rb:7:in `initialize'
	from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:1237:in `new'
	from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:1235:in `instance_eval'
	from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:1235:in `new'
	from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:1074:in `event_callback'
	from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:224:in `run_machine'
	from /Library/Ruby/Gems/1.8/gems/eventmachine-0.12.0/lib/eventmachine.rb:224:in `run'
	from duh.rb:11

Change History

08/05/08 06:08:04 changed by raggi

  • owner set to raggi.

08/05/08 06:08:37 changed by raggi

  • status changed from new to assigned.

This may be normal, however, it violates POLS, so some investigation should be done, and documented or changed.