code: func (h *Handle) sweepList() {
  	prev := h.listHead
  	prev.Lock()
  	errorRateMap := make(errorRateDeltaMap)
  	for curr := prev.next; curr != nil; curr = curr.next {
  		curr.Lock()
  		// Merge the session stats into handle and error rate map.
  		h.merge(curr, errorRateMap)
  		if curr.deleted {
  			prev.next = curr.next
  			// Since the session is already closed, we can safely unlock it here.
  			curr.Unlock()
  		} else {
  			// Unlock the previous lock, so we only holds at most two session's lock at the same time.
  			prev.Unlock()
  			prev = curr
  		}
  	}
  	prev.Unlock()
  	h.mu.Lock()
  	h.mu.rateMap.merge(errorRateMap)
  	h.mu.Unlock()
  }
docs: // sweepList will loop over the list, merge each session's local stats into handle
  // and remove closed session's collector.