Thu, 03 Dec 2009 17:02:38 +0100
mod_proxy65: Only lock the reading side when throttling
plugins/mod_proxy65.lua | file | annotate | diff | comparison | revisions |
--- a/plugins/mod_proxy65.lua Thu Dec 03 16:53:58 2009 +0100 +++ b/plugins/mod_proxy65.lua Thu Dec 03 17:02:38 2009 +0100 @@ -262,7 +262,7 @@ function receiver.sendbuffer() _sendbuffer(); if sender_locked and receiver.bufferlen() < sender_lock_threshold then - sender:lock(false); -- Unlock now + sender:lock_read(false); -- Unlock now sender_locked = nil; end end @@ -272,7 +272,7 @@ _readbuffer(); if not sender_locked and receiver.bufferlen() >= sender_lock_threshold then sender_locked = true; - sender:lock(true); + sender:lock_read(true); end end end