event_machine: avoid race in unchunked fast pipe responses
commit549b25fd501b0df4a4a8b5edccde6101edb0cd63
authorEric Wong <normalperson@yhbt.net>
Mon, 19 Jul 2010 10:09:53 +0000 (19 10:09 +0000)
committerEric Wong <normalperson@yhbt.net>
Tue, 20 Jul 2010 00:04:23 +0000 (19 17:04 -0700)
treed0ba43edb1b6ca84a4f89207dcc7397e57c3a9c8
parent12205e29b29f844295d1794bfe10634646541f20
event_machine: avoid race in unchunked fast pipe responses

Using EM.enable_proxy with EM.attach seems to cause
EM::Connection#receive_data callbacks to be fired before the
proxy has a chance to act, leading the first few chunks of data
being lost in the default receive_data handler.  Instead
just rely on EM.watch like the chunked pipe.
lib/rainbows/event_machine.rb
t/fast-pipe-response.ru [new file with mode: 0644]
t/t0030-fast-pipe-response.sh [new file with mode: 0755]