code: def handle_request(self):
          timeout = self.socket.gettimeout()
          if timeout is None:
              timeout = self.timeout
          elif self.timeout is not None:
              timeout = min(timeout, self.timeout)
          ctime = get_time()
          done_req = False
          shutdown_latency = self.shutdown_latency
          if timeout is not None:
              shutdown_latency = min(shutdown_latency, timeout) \
                  if shutdown_latency is not None else timeout
          while not (self.done or done_req) and (timeout is None or
                                                 timeout == 0 or
                                                 (get_time() - ctime) < timeout):
              try:
                  fd_sets = select.select([self], [], [], shutdown_latency)
              except (OSError, select.error) as e:
                  if e.args[0] != errno.EINTR:
                      raise
                  fd_sets = [[], [], []]
              for _fd in fd_sets[0]:
                  done_req = True
                  self._handle_request_noblock()
              if timeout == 0:
                  break
          if not (self.done or done_req):
              self.handle_timeout()