##// END OF EJS Templates
configitems: register the 'badserver.closeaftersendbytes' config
marmoute -
r33190:cbb50fd8 default
parent child Browse files
Show More
@@ -50,6 +50,9 b" configitem('badserver', 'closeafteraccep"
50 configitem('badserver', 'closeafterrecvbytes',
50 configitem('badserver', 'closeafterrecvbytes',
51 default=0,
51 default=0,
52 )
52 )
53 configitem('badserver', 'closeaftersendbytes',
54 default=0,
55 )
53
56
54 # We can't adjust __class__ on a socket instance. So we define a proxy type.
57 # We can't adjust __class__ on a socket instance. So we define a proxy type.
55 class socketproxy(object):
58 class socketproxy(object):
@@ -272,7 +275,7 b' def extsetup(ui):'
272 closeafterrecvbytes = self._ui.configint('badserver',
275 closeafterrecvbytes = self._ui.configint('badserver',
273 'closeafterrecvbytes')
276 'closeafterrecvbytes')
274 closeaftersendbytes = self._ui.configint('badserver',
277 closeaftersendbytes = self._ui.configint('badserver',
275 'closeaftersendbytes', 0)
278 'closeaftersendbytes')
276
279
277 if closeafterrecvbytes or closeaftersendbytes:
280 if closeafterrecvbytes or closeaftersendbytes:
278 socket = socketproxy(socket, self.errorlog,
281 socket = socketproxy(socket, self.errorlog,
General Comments 0
You need to be logged in to leave comments. Login now