# HG changeset patch # User Augie Fackler # Date 2018-08-10 06:30:14 # Node ID ed8160e4fea0480301b241fd967d4fa0ba62cad7 # Parent 2e37bd6148797fc50f07d7d23ab8d3c0fa005e87 util: fix signature of setsockopt in socket observer The format string expected the result, callers all passed the result, but we didn't actually accept the result to this function. I swear I've looked at this code a dozen times trying to find the problem, and it was this simple all along. Differential Revision: https://phab.mercurial-scm.org/D4253 diff --git a/mercurial/util.py b/mercurial/util.py --- a/mercurial/util.py +++ b/mercurial/util.py @@ -948,12 +948,12 @@ class socketobserver(baseproxyobserver): self.fh.write('%s> gettimeout() -> %f\n' % (self.name, res)) - def setsockopt(self, level, optname, value): + def setsockopt(self, res, level, optname, value): if not self.states: return self.fh.write('%s> setsockopt(%r, %r, %r) -> %r\n' % ( - self.name, level, optname, value)) + self.name, level, optname, value, res)) def makeloggingsocket(logh, fh, name, reads=True, writes=True, states=True, logdata=False, logdataapis=True):