Skip to content

Commit

Permalink
Correctly handle string ports in EM.start_server and EM.connect
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed May 5, 2009
1 parent e1a04d9 commit 123ed20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/eventmachine.rb
Expand Up @@ -562,7 +562,7 @@ def self.start_server server, port=nil, handler=nil, *args, &block
end

s = if port
start_tcp_server server, port
start_tcp_server server, port.to_i
else
start_unix_server server
end
Expand Down Expand Up @@ -720,7 +720,7 @@ def self.bind_connect bind_addr, bind_port, server, port=nil, handler=nil, *args
end

def self.connect server, port=nil, handler=nil, *args, &blk
bind_connect nil, nil, server, port, handler, *args, &blk
bind_connect nil, nil, server, port.to_i, handler, *args, &blk
end

# EventMachine::attach registers a given file descriptor or IO object with the eventloop
Expand Down

0 comments on commit 123ed20

Please sign in to comment.