Mercurial > hg
changeset 33192:c538fca0d511
configitems: register the 'badserver.closeafterrecvbytes' config
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Fri, 30 Jun 2017 03:27:44 +0200 |
parents | 8065b4ab0ed7 |
children | cbb50fd830ea |
files | tests/badserverext.py |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)