forked from quic-go/quic-go
@@ -30,11 +30,15 @@ func wrapConn(pc net.PacketConn) (rawConn, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
if _, ok := pc.LocalAddr().(*net.UDPAddr); ok {
|
||||
// Only set DF on sockets that we expect to be able to handle that configuration.
|
||||
err = setDF(rawConn)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
}
|
||||
}
|
||||
c, ok := pc.(OOBCapablePacketConn)
|
||||
if !ok {
|
||||
utils.DefaultLogger.Infof("PacketConn is not a net.UDPConn. Disabling optimizations possible on UDP connections.")
|
||||
|
||||
Reference in New Issue
Block a user