code: func (nc *Conn) flusher() {
  	// Release the wait group
  	defer nc.wg.Done()
  
  	// snapshot the bw and conn since they can change from underneath of us.
  	nc.mu.Lock()
  	bw := nc.bw
  	conn := nc.conn
  	fch := nc.fch
  	nc.mu.Unlock()
  
  	if conn == nil || bw == nil {
  		return
  	}
  
  	for {
  		if _, ok := <-fch; !ok {
  			return
  		}
  		nc.mu.Lock()
  
  		// Check to see if we should bail out.
  		if !nc.isConnected() || nc.isConnecting() || bw != nc.bw || conn != nc.conn {
  			nc.mu.Unlock()
  			return
  		}
  		if bw.Buffered() > 0 {
  			if err := bw.Flush(); err != nil {
  				if nc.err == nil {
  					nc.err = err
  				}
  			}
  		}
  		nc.mu.Unlock()
  	}
  }
docs: // flusher is a separate Go routine that will process flush requests for the write
  // bufio. This allows coalescing of writes to the underlying socket.