projects
/
quix0rs-apt-p2p.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
1cc5dbf
)
Only use the ThrottlingProtocol if the producer is streaming.
author
Cameron Dale
<camrdale@gmail.com>
Wed, 27 Feb 2008 07:05:00 +0000
(23:05 -0800)
committer
Cameron Dale
<camrdale@gmail.com>
Wed, 27 Feb 2008 07:05:00 +0000
(23:05 -0800)
apt_dht/policies.py
patch
|
blob
|
history
diff --git
a/apt_dht/policies.py
b/apt_dht/policies.py
index 8254c9cbf2d2b6ab23d41873ebe50a06bcef23ea..3c84c149b3c38dd1317b46031fddf0b602da6e33 100644
(file)
--- a/
apt_dht/policies.py
+++ b/
apt_dht/policies.py
@@
-159,6
+159,7
@@
class ThrottlingProtocol(ProtocolWrapper):
ProtocolWrapper.dataReceived(self, data)
def registerProducer(self, producer, streaming):
+ assert streaming, "You can only use the ThrottlingProtocol with streaming (push) producers."
self.producer = producer
ProtocolWrapper.registerProducer(self, producer, streaming)