1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00

fix a bug in udp hub

This commit is contained in:
Darien Raymond 2017-02-13 23:03:36 +01:00
parent 76d2e5517b
commit 48639ddb98
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -130,7 +130,14 @@ func (v *Hub) WriteTo(payload []byte, dest v2net.Destination) (int, error) {
func (v *Hub) start(ctx context.Context) { func (v *Hub) start(ctx context.Context) {
oobBytes := make([]byte, 256) oobBytes := make([]byte, 256)
for range ctx.Done() { L:
for {
select {
case <-ctx.Done():
break L
default:
}
buffer := buf.NewSmall() buffer := buf.NewSmall()
var noob int var noob int
var addr *net.UDPAddr var addr *net.UDPAddr