~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/http_server.py

  • Committer: Matt Nordhoff
  • Date: 2009-06-23 05:12:07 UTC
  • mto: This revision was merged to the branch mainline in revision 4474.
  • Revision ID: mnordhoff@mattnordhoff.com-20090623051207-fksdtbzkwtnrw9dd
Update _add_text docstrings that still referred to add_text.

Show diffs side-by-side

added added

removed removed

Lines of Context:
382
382
        # lying around.
383
383
        self.daemon_threads = True
384
384
 
385
 
    def process_request_thread(self, request, client_address):
386
 
        SocketServer.ThreadingTCPServer.process_request_thread(
387
 
            self, request, client_address)
388
 
        # Under some circumstances (as in bug #383920), we need to force the
389
 
        # shutdown as python delays it until gc occur otherwise and the client
390
 
        # may hang.
391
 
        try:
392
 
            # The request process has been completed, the thread is about to
393
 
            # die, let's shutdown the socket if we can.
394
 
            request.shutdown(socket.SHUT_RDWR)
395
 
        except (socket.error, select.error), e:
396
 
            if e[0] in (errno.EBADF, errno.ENOTCONN):
397
 
                # Right, the socket is already down
398
 
                pass
399
 
            else:
400
 
                raise
401
 
 
402
385
 
403
386
class HttpServer(transport.Server):
404
387
    """A test server for http transports.