mod_proxy65: Only lock the reading side when throttling

Thu, 03 Dec 2009 17:02:38 +0100

author
Sjoerd Simons <sjoerd.simons@collabora.co.uk>
date
Thu, 03 Dec 2009 17:02:38 +0100
changeset 2308
600ac8992a4c
parent 2307
fc7e0962520a
child 2309
7dc6049a69e8

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

mercurial