code: func (t *NetTransport) Shutdown() error {
  	// This will avoid log spam about errors when we shut down.
  	atomic.StoreInt32(&t.shutdown, 1)
  
  	// Rip through all the connections and shut them down.
  	for _, conn := range t.tcpListeners {
  		conn.Close()
  	}
  	for _, conn := range t.udpListeners {
  		conn.Close()
  	}
  
  	// Block until all the listener threads have died.
  	t.wg.Wait()
  	return nil
  }
docs: // See Transport.