Diff

plugins/mod_proxy65.lua @ 2308:600ac8992a4c

mod_proxy65: Only lock the reading side when throttling
author Sjoerd Simons <sjoerd.simons@collabora.co.uk>
date Thu, 03 Dec 2009 17:02:38 +0100
parent 2306:21f0d80f244a
child 2309:7dc6049a69e8
line wrap: on
line diff
--- 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