Fix the incorrect parameter order ()

Signed-off-by: cuishuang <imcusg@gmail.com>
This commit is contained in:
cui fliter 2025-04-13 11:19:32 +08:00 committed by GitHub
parent ce926b87ed
commit def9db1f16
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -641,7 +641,7 @@ func RegisterNetwork(network string, getListener ListenerFunc) {
if network == "tcp" || network == "tcp4" || network == "tcp6" ||
network == "udp" || network == "udp4" || network == "udp6" ||
network == "unix" || network == "unixpacket" || network == "unixgram" ||
strings.HasPrefix("ip:", network) || strings.HasPrefix("ip4:", network) || strings.HasPrefix("ip6:", network) ||
strings.HasPrefix(network, "ip:") || strings.HasPrefix(network, "ip4:") || strings.HasPrefix(network, "ip6:") ||
network == "fd" || network == "fdgram" {
panic("network type " + network + " is reserved")
}