mirror of
https://github.com/bolucat/Archive.git
synced 2025-12-24 13:28:37 +08:00
Update On Sun Nov 2 19:34:21 CET 2025
This commit is contained in:
@@ -252,13 +252,14 @@ func (spc *ssrPacketConn) WaitReadFrom() (data []byte, put func(), addr net.Addr
|
||||
return nil, nil, nil, errors.New("parse addr error")
|
||||
}
|
||||
|
||||
addr = _addr.UDPAddr()
|
||||
if addr == nil {
|
||||
udpAddr := _addr.UDPAddr()
|
||||
if udpAddr == nil {
|
||||
if put != nil {
|
||||
put()
|
||||
}
|
||||
return nil, nil, nil, errors.New("parse addr error")
|
||||
}
|
||||
addr = udpAddr
|
||||
|
||||
data = data[len(_addr):]
|
||||
return
|
||||
|
||||
@@ -183,7 +183,11 @@ func (pc *PacketConn) WaitReadFrom() (data []byte, put func(), addr net.Addr, er
|
||||
if err != nil {
|
||||
return nil, nil, nil, err
|
||||
}
|
||||
addr = destination.UDPAddr()
|
||||
udpAddr := destination.UDPAddr()
|
||||
if udpAddr == nil {
|
||||
return nil, nil, nil, errors.New("parse addr error")
|
||||
}
|
||||
addr = udpAddr
|
||||
|
||||
data = pool.Get(pool.UDPBufferSize)
|
||||
put = func() {
|
||||
|
||||
Reference in New Issue
Block a user