code: func (s *sender) updateMaxPayloadSize(mtu, count int) {
  	m := mtu - header.TCPMinimumSize
  
  	m -= s.ep.maxOptionSize()
  
  	// We don't adjust up for now.
  	if m >= s.maxPayloadSize {
  		return
  	}
  
  	// Make sure we can transmit at least one byte.
  	if m <= 0 {
  		m = 1
  	}
  
  	s.maxPayloadSize = m
  	if s.gso {
  		s.ep.gso.MSS = uint16(m)
  	}
  
  	s.outstanding -= count
  	if s.outstanding < 0 {
  		s.outstanding = 0
  	}
  
  	// Rewind writeNext to the first segment exceeding the MTU. Do nothing
  	// if it is already before such a packet.
  	for seg := s.writeList.Front(); seg != nil; seg = seg.Next() {
  		if seg == s.writeNext {
  			// We got to writeNext before we could find a segment
  			// exceeding the MTU.
  			break
  		}
  
  		if seg.data.Size() > m {
  			// We found a segment exceeding the MTU. Rewind
  			// writeNext and try to retransmit it.
  			s.writeNext = seg
  			break
  		}
  	}
  
  	// Since we likely reduced the number of outstanding packets, we may be
  	// ready to send some more.
  	s.sendData()
  }
docs: // updateMaxPayloadSize updates the maximum payload size based on the given
  // MTU. If this is in response to "packet too big" control packets (indicated
  // by the count argument), it also reduces the number of outstanding packets and
  // attempts to retransmit the first packet above the MTU size.