mirror of
https://github.com/v2fly/v2ray-core.git
synced 2026-04-22 13:39:11 -04:00
fix a bug in udp hub
This commit is contained in:
@@ -130,7 +130,14 @@ func (v *Hub) WriteTo(payload []byte, dest v2net.Destination) (int, error) {
|
||||
|
||||
func (v *Hub) start(ctx context.Context) {
|
||||
oobBytes := make([]byte, 256)
|
||||
for range ctx.Done() {
|
||||
L:
|
||||
for {
|
||||
select {
|
||||
case <-ctx.Done():
|
||||
break L
|
||||
default:
|
||||
}
|
||||
|
||||
buffer := buf.NewSmall()
|
||||
var noob int
|
||||
var addr *net.UDPAddr
|
||||
|
||||
Reference in New Issue
Block a user