[PATCH] Close keepalive connections to fix pserver traceback
Alexis S. L. Carvalho
alexis at cecm.usp.br
Sun Mar 4 05:44:26 CST 2007
Thus spake Andrei Vermel:
> Attached patch is to fix server displaying following after any access
> except clone:
> Exception happened during processing of request from ('127.0.0.1', 2915)
> Traceback (most recent call last):
> File "C:\Python24\lib\socket.py", line 340, in readline
> data = self._sock.recv(self._rbufsize)
> error: (10054, 'Connection reset by peer')
Maybe we should catch this exception on the server itself - "Connection
reset by peer" is not really worthy of a traceback...
OTOH, we shouldn't cause it with hg if there was no error. Google
suggests winsock sends an RST if the process doesn't cleanly close the
connection. I don't like the idea of adding new __del__ methods, but I
guess that's ok for -stable.
I've changed the patch to only save a reference to the keepalive handler
and pushed it to crew-stable.
More information about the Mercurial-devel