configitems: register the 'badserver.closeafterrecvbytes' config
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 30 Jun 2017 03:27:44 +0200
changeset 33192 c538fca0d511
parent 33191 8065b4ab0ed7
child 33193 cbb50fd830ea
configitems: register the 'badserver.closeafterrecvbytes' config
tests/badserverext.py
--- a/tests/badserverext.py	Fri Jun 30 03:27:36 2017 +0200
+++ b/tests/badserverext.py	Fri Jun 30 03:27:44 2017 +0200
@@ -47,6 +47,9 @@
 configitem('badserver', 'closeafteraccept',
     default=False,
 )
+configitem('badserver', 'closeafterrecvbytes',
+    default=0,
+)
 
 # We can't adjust __class__ on a socket instance. So we define a proxy type.
 class socketproxy(object):
@@ -267,7 +270,7 @@
         def process_request(self, socket, address):
             # Wrap socket in a proxy if we need to count bytes.
             closeafterrecvbytes = self._ui.configint('badserver',
-                                                     'closeafterrecvbytes', 0)
+                                                     'closeafterrecvbytes')
             closeaftersendbytes = self._ui.configint('badserver',
                                                      'closeaftersendbytes', 0)