aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-12-03 17:02:38 +0100
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-12-03 17:02:38 +0100
commit241f1dc323f6f7a56c4813226fca101fe9bbc63c (patch)
tree26662e3cfb8bad0b87aaf3d679e9de43dbef0b53 /plugins
parent2c89ba5b4beaaea1bd0b4bde1717a73c5a437661 (diff)
downloadprosody-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.lua4
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