Skip to content
This repository has been archived by the owner on Dec 7, 2018. It is now read-only.

Commit

Permalink
Merge 01e699a into 99aa512
Browse files Browse the repository at this point in the history
  • Loading branch information
czaks committed Aug 9, 2014
2 parents 99aa512 + 01e699a commit dfa76f7
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions lib/reel/server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,6 @@ def run
loop { async.handle_connection @server.accept }
end

def optimize(socket)
if socket.is_a? TCPSocket
socket.setsockopt(Socket::IPPROTO_TCP, :TCP_NODELAY, 1)
end
end

def handle_connection(socket)
if @spy
require 'reel/spy'
Expand Down
2 changes: 1 addition & 1 deletion lib/reel/server/http.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ class HTTP < Server
#
# @return [Reel::Server::HTTP] Reel HTTP server actor
def initialize(host, port, options={}, &callback)
optimize server = Celluloid::IO::TCPServer.new(host, port)
server = Celluloid::IO::TCPServer.new(host, port)
options.merge!(host: host, port: port)
super(server, options, &callback)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/reel/server/https.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def initialize(host, port, options={}, &callback)
OpenSSL::SSL::VERIFY_NONE
end

optimize @tcpserver = Celluloid::IO::TCPServer.new(host, port)
@tcpserver = Celluloid::IO::TCPServer.new(host, port)

server = Celluloid::IO::SSLServer.new(@tcpserver, ssl_context)
options.merge!(host: host, port: port)
Expand Down

0 comments on commit dfa76f7

Please sign in to comment.