'Run a WSGI server.'

def run_server(self):

    eventlet.wsgi.HttpProtocol.default_request_version = 'HTTP/1.0'
    eventlet.hubs.use_hub('poll')
    eventlet.patcher.monkey_patch(all=False, socket=True)
    self.pool = eventlet.GreenPool(size=self.threads)
    socket_timeout = (cfg.CONF.eventlet_opts.client_socket_timeout or None)
    try:
        eventlet.wsgi.server(self.sock, self.application, custom_pool=self.pool, url_length_limit=URL_LENGTH_LIMIT, log=self._logger, debug=cfg.CONF.debug, keepalive=cfg.CONF.eventlet_opts.wsgi_keep_alive, socket_timeout=socket_timeout)
    except socket.error as err:
        if (err[0] != errno.EINVAL):
            raise
    self.pool.waitall()
