override final def findNextNodeToVisit()

in cassovary-core/src/main/scala/com/twitter/cassovary/graph/Traverser.scala [512:528]


   override final def findNextNodeToVisit(): Option[Int] = {
    if (queue.isEmpty) {
      None
    } else {
      val next = queue.first()
      val visitedBefore = coloring.get(next) match {
        case Walk.NodeColor.Visited => true
        case _ => false
      }
      if (visitedBefore) {
        handleVisitedInQueue(next)
        findNextNodeToVisit()
      } else {
        Some(next)
      }
    }
  }