diff options
author | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-12-03 17:02:38 +0100 |
---|---|---|
committer | Sjoerd Simons <sjoerd.simons@collabora.co.uk> | 2009-12-03 17:02:38 +0100 |
commit | 241f1dc323f6f7a56c4813226fca101fe9bbc63c (patch) | |
tree | 26662e3cfb8bad0b87aaf3d679e9de43dbef0b53 /plugins | |
parent | 2c89ba5b4beaaea1bd0b4bde1717a73c5a437661 (diff) | |
download | prosody-241f1dc323f6f7a56c4813226fca101fe9bbc63c.tar.gz prosody-241f1dc323f6f7a56c4813226fca101fe9bbc63c.zip |
mod_proxy65: Only lock the reading side when throttling
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/mod_proxy65.lua | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_proxy65.lua b/plugins/mod_proxy65.lua index 01ff9bef..0858c409 100644 --- a/plugins/mod_proxy65.lua +++ b/plugins/mod_proxy65.lua @@ -262,7 +262,7 @@ function throttle_sending(sender, receiver) 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 @@ function throttle_sending(sender, receiver) _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 |