def serve_forever(self): """Handle one request at a time until stopped.""" self.stop = False while not self.stop: self.handle_request() # stop the http server