[PATCH 1 of 6] Fix test-push-http: Workaround for missing shutdown in SocketServer.TCPServer.close_request
Dirkjan Ochtman
dirkjan at ochtman.nl
Thu Sep 18 07:48:30 CDT 2008
Mads Kiilerich <mads <at> kiilerich.com> writes:
> + def close_request(self, request):
> + """Fix missing shutdown in SocketServer.TCPServer.close_request
> + which causes socket.close() to send RST (on some OSs), causing
> + recv() in hg push to (sometimes) fail even with data waiting."""
> + request.shutdown(socket.SHUT_WR)
> + BaseHTTPServer.HTTPServer.close_request(self, request)
Hmm, not sure about this one. How did you come up with this? Of what type is
the request parameter for close_request()? Also HTTPServer.close_request() seems
to actually be TCPServer.close_request(), which calls request.close(). Would that
not be enough, or do we actually need to shut the socket down?
It seems rather obscure to me.
Cheers,
Dirkjan
More information about the Mercurial-devel
mailing list