code: func (e *endpoint) completeWorkerLocked() {
  	e.workerRunning = false
  	if e.workerCleanup {
  		e.cleanupLocked()
  	}
  }
docs: // completeWorkerLocked is called by the worker goroutine when it's about to
  // exit. It marks the worker as completed and performs cleanup work if requested
  // by Close().