dont fallback to tcp if udp failes

This commit is contained in:
seydx
2025-06-01 18:40:53 +03:00
parent 859cd1cbe6
commit 24ca87e00d
3 changed files with 8 additions and 15 deletions
+1 -5
View File
@@ -49,8 +49,6 @@ type Conn struct {
state State
stateMu sync.Mutex
transportMode TransportMode
// UDP
udpRtpConns map[byte]*UDPConnection
@@ -69,8 +67,6 @@ type UDPConnection struct {
type TransportMode int
const (
TransportTCP TransportMode = iota
TransportUDP
ReceiveMTU = 1500
)
@@ -161,7 +157,7 @@ func (c *Conn) Handle() (err error) {
return
}
if c.transportMode == TransportUDP {
if c.Transport == "udp" {
if err = c.handleUDPClientData(time); err != nil {
return err
}