diff options
author | Eric Wong <e@80x24.org> | 2019-05-26 22:15:44 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2019-05-26 22:27:35 +0000 |
commit | 07b64755b203d9c99a59ae69e3155103d4cfefc5 (patch) | |
tree | 585cc0b26b7b7bb8d2e5cb3dfa58a455b2537ea1 /lib/unicorn/http_request.rb | |
parent | 2ea6af4ed1ce5f3a34bdfd32b9e54a67fabcff26 (diff) | |
download | unicorn-no-kgio-wip.tar.gz |
It's fairly easy given unicorn was designed with synchronous I/O in mind. The overhead of backtraces from EOFError on readpartial should be rare given our requirement to only accept requests from fast, reliable clients on LAN (e.g. nginx or yet-another-horribly-named-server).
Diffstat (limited to 'lib/unicorn/http_request.rb')
-rw-r--r-- | lib/unicorn/http_request.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/unicorn/http_request.rb b/lib/unicorn/http_request.rb index bcc1f2d..69b9b52 100644 --- a/lib/unicorn/http_request.rb +++ b/lib/unicorn/http_request.rb @@ -75,11 +75,11 @@ class Unicorn::HttpParser e['REMOTE_ADDR'] = socket.kgio_addr # short circuit the common case with small GET requests first - socket.kgio_read!(16384, buf) + socket.readpartial(16384, buf) if parse.nil? # Parser is not done, queue up more data to read and continue parsing # an Exception thrown from the parser will throw us out of the loop - false until add_parse(socket.kgio_read!(16384)) + false until add_parse(socket.readpartial(16384)) end check_client_connection(socket) if @@check_client_connection |