From 894cb73887c106acc793f0317ee849ae215ead56 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 25 Oct 2010 22:15:47 +0000 Subject: reduce dependency on IO#write_nonblock kgio_trywrite is superior if it is available. --- lib/rainbows/process_client.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/rainbows/process_client.rb') diff --git a/lib/rainbows/process_client.rb b/lib/rainbows/process_client.rb index 5e200e5..1e2d0d9 100644 --- a/lib/rainbows/process_client.rb +++ b/lib/rainbows/process_client.rb @@ -19,13 +19,13 @@ module Rainbows::ProcessClient # Base, ThreadSpawn, ThreadPool def process_client(client) # :nodoc: hp = HttpParser.new - client.readpartial(16384, buf = hp.buf) + client.kgio_read!(16384, buf = hp.buf) remote_addr = client.kgio_addr begin # loop until env = hp.parse wait_headers_readable(client) or return - buf << client.readpartial(16384) + buf << client.kgio_read!(16384) end env[CLIENT_IO] = client -- cgit v1.2.3-24-ge0c7