[relay] Set InitialPacketSize to the maximum allowable value (#3188)

Fixes an issue on macOS where the server throws errors with default settings:
failed to write transport message to: DATAGRAM frame too large.

Further investigation is required to optimize MTU-related values.
This commit is contained in:
Zoltan Papp
2025-01-16 16:19:07 +01:00
committed by GitHub
parent bc7b2c6ba3
commit 481bbe8513
2 changed files with 6 additions and 4 deletions

View File

@@ -25,7 +25,8 @@ func (l *Listener) Listen(acceptFn func(conn net.Conn)) error {
l.acceptFn = acceptFn
quicCfg := &quic.Config{
EnableDatagrams: true,
EnableDatagrams: true,
InitialPacketSize: 1452,
}
listener, err := quic.ListenAddr(l.Address, l.TLSConfig, quicCfg)
if err != nil {