def METHOD_NAME(conn_queue):
  while True:
    session = conn_queue.get()
    if session is None:
      return
    try:
      session.run()
    except Exception as e:
      log("Error handling client: {}".format(e))
    finally:
      log("Client disconnected: {}".format(session.addr))