// Destroy the underlying connection and wait until listen() has returned.
// It does not close active sessions.
Destroy the underlying connection and wait until listen() has returned.
It does not close active sessions.
// Destroy the underlying connection and wait until listen () has returned . // It does not close active sessions .
func (h *packetHandlerMap) Destroy() error {
	if err := h.conn.Close(); err != nil {
		return err
	}
	<-h.listening 
	return nil
}
func ( h * packetHandlerMap ) Destroy ( ) error { if err := h . conn . Close ( ) ; err != nil { return err } <- h . listening return nil }
Destroy the underlying connection and wait until listen() has returned.
Destroy the underlying connection and wait until listen () has returned .
// wait until listening returns