about summary refs log tree commit homepage
path: root/lib
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2015-04-09 21:51:56 +0000
committerEric Wong <e@80x24.org>2015-04-09 22:20:28 +0000
commit18f0ab28eae3c5db32ee9e59a3fe104f981983d0 (patch)
tree49efd813b52a38ef08ae37059335d37a8706d45d /lib
parentdf92940cc9afdd8a95301734c2c79471ed861c9a (diff)
downloadyahns-18f0ab28eae3c5db32ee9e59a3fe104f981983d0.tar.gz
This giant method needs to spew an error response in case uploads
to the upstream fail, ensure the local variable is defined early.
Diffstat (limited to 'lib')
-rw-r--r--lib/yahns/proxy_pass.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/yahns/proxy_pass.rb b/lib/yahns/proxy_pass.rb
index 1b8eed7..d02bb40 100644
--- a/lib/yahns/proxy_pass.rb
+++ b/lib/yahns/proxy_pass.rb
@@ -28,10 +28,10 @@ class Yahns::ProxyPass # :nodoc:
     end
 
     def yahns_step # yahns event loop entry point
+      c = @yahns_client
       case req = @rrstate
       when Kcar::Parser # reading response...
         buf = Thread.current[:yahns_rbuf]
-        c = @yahns_client
 
         case resbuf = @resbuf # where are we at the response?
         when nil # common case, catch the response header in a single read