From a9d1fc829fc418c2e808955b9910004dff8ab769 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 1 Nov 2009 00:24:46 -0700 Subject: event_machine: avoid slurping when proxying Avoid slurping in case we're a fast backend writing to a slow client. This should prevent our memory usage from exploding when clients are reading slowly. --- lib/rainbows/event_machine.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rainbows/event_machine.rb') diff --git a/lib/rainbows/event_machine.rb b/lib/rainbows/event_machine.rb index 289c92e..196fbca 100644 --- a/lib/rainbows/event_machine.rb +++ b/lib/rainbows/event_machine.rb @@ -114,7 +114,7 @@ module Rainbows if do_chunk EM.watch(io, ResponseChunkPipe, self).notify_readable = true else - EM.enable_proxy(EM.attach(io, ResponsePipe, self), self) + EM.enable_proxy(EM.attach(io, ResponsePipe, self), self, 16384) end else HttpResponse.write(self, response, out) -- cgit v1.2.3-24-ge0c7