func (l *overseerListener) release(timeout time.Duration) {
	//stop accepting connections - release fd
	l.closeError = l.Listener.Close()
	//start timer, close by force if deadline not met
	waited := make(chan bool)
	go func() {
		l.wg.Wait()
		waited <- true
	}()
	go func() {
		select {
		case <-time.After(timeout):
			close(l.closeByForce)
		case <-waited:
			//no need to force close
		}
	}()
}
func (l *overseerListener) release(timeout time.Duration) {
	
	l.closeError = l.Listener.Close()
	
	waited := make(chan bool)
	go func() {
		l.wg.Wait()
		waited <- true
	}()
	go func() {
		select {
		case <-time.After(timeout):
			close(l.closeByForce)
		case <-waited:
			
		}
	}()
}
func ( l * overseerListener ) release ( timeout time . Duration ) { //stop accepting connections - release fd l . closeError = l . Listener . Close ( ) //start timer, close by force if deadline not met waited := make ( chan bool ) go func ( ) { l . wg . Wait ( ) waited <- true } ( ) go func ( ) { select { case <- time . After ( timeout ) : close ( l . closeByForce ) case <- waited : //no need to force close } } ( ) }
//non-blocking trigger close
non - blocking trigger close