1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-01-02 23:47:07 -05:00

notify progressTraffic to quit

This commit is contained in:
Shelikhoo 2018-03-18 22:13:17 +08:00
parent 3e05a3529a
commit 09bf78a089
No known key found for this signature in database
GPG Key ID: 7791BDB0709ABD21
2 changed files with 6 additions and 1 deletions

View File

@ -39,8 +39,12 @@ func (uih *UnixInboundHandler) Start() {
return
}
func (uih *UnixInboundHandler) progressTraffic(rece <-chan net.Conn) {
for {
conn := <-rece
conn, notclosed := <-rece
if !notclosed {
return
}
go func(conn net.Conn) {
ctx, cancel := context.WithCancel(uih.ctx)
if len(uih.tag) > 0 {

View File

@ -128,6 +128,7 @@ func (ls *Listener) uploop(cctx context.Context) {
errortolerance := 5
for {
if cctx.Err() != nil {
close(ls.listenerChan)
return
}
conn, err := ls.ln.Accept()