mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-09-26 13:56:12 -04:00
relace Notifier with Done
This commit is contained in:
parent
897b5a51f0
commit
70abb689bf
@ -7,7 +7,6 @@ import (
|
||||
"v2ray.com/core"
|
||||
"v2ray.com/core/common"
|
||||
"v2ray.com/core/common/net"
|
||||
"v2ray.com/core/common/signal"
|
||||
"v2ray.com/core/common/signal/done"
|
||||
"v2ray.com/core/transport/pipe"
|
||||
)
|
||||
@ -80,8 +79,8 @@ func (co *Outbound) Dispatch(ctx context.Context, link *core.Link) {
|
||||
return
|
||||
}
|
||||
|
||||
closeSignal := signal.NewNotifier()
|
||||
c := net.NewConnection(net.ConnectionInputMulti(link.Writer), net.ConnectionOutputMulti(link.Reader), net.ConnectionOnClose(signal.NotifyClose(closeSignal)))
|
||||
closeSignal := done.New()
|
||||
c := net.NewConnection(net.ConnectionInputMulti(link.Writer), net.ConnectionOutputMulti(link.Reader), net.ConnectionOnClose(closeSignal))
|
||||
co.listener.add(c)
|
||||
co.access.RUnlock()
|
||||
<-closeSignal.Wait()
|
||||
|
Loading…
Reference in New Issue
Block a user