func StopBBPD() error {
	accept_mut.Lock()
	accepting = false
	accept_mut.Unlock()
	wait_chan := make(chan bool, 1)
	go func() {
		conns_wg.Wait()
		wait_chan <- true
	}()
	select {
	case <-wait_chan:
		log.Printf("conns completed, graceful exit possible")
		return nil
	case <-time.After(1000 * time.Millisecond):
		return errors.New("shutdown timed out")
	}
	return nil
}
// StopBBPD executes any shutdown tasks.
StopBBPD executes any shutdown tasks.
// StopBBPD executes any shutdown tasks .
func StopBBPD() error {
	accept_mut.Lock()
	accepting = false
	accept_mut.Unlock()
	wait_chan := make(chan bool, 1)
	go func() {
		conns_wg.Wait()
		wait_chan <- true
	}()
	select {
	case <-wait_chan:
		log.Printf("conns completed, graceful exit possible")
		return nil
	case <-time.After(1000 * time.Millisecond):
		return errors.New("shutdown timed out")
	}
	return nil
}
func StopBBPD ( ) error { accept_mut . Lock ( ) accepting = false accept_mut . Unlock ( ) wait_chan := make ( chan bool , 1 ) go func ( ) { conns_wg . Wait ( ) wait_chan <- true } ( ) select { case <- wait_chan : log . Printf ( " " ) return nil case <- time . After ( 1000 * time . Millisecond ) : return errors . New ( " " ) } return nil }
StopBBPD executes any shutdown tasks.
StopBBPD executes any shutdown tasks .