mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-07-23 18:34:14 +00:00
Update dispatcher.go
This commit is contained in:
parent
0c561f23bf
commit
91f312bc29
1 changed files with 3 additions and 2 deletions
|
@ -85,6 +85,7 @@ func (v *Dispatcher) getInboundRay(ctx context.Context, dest net.Destination) (*
|
||||||
link: link,
|
link: link,
|
||||||
cancel: cancel,
|
cancel: cancel,
|
||||||
}
|
}
|
||||||
|
entry.cancel()
|
||||||
//entryClose := func() {
|
//entryClose := func() {
|
||||||
// entry.Close()
|
// entry.Close()
|
||||||
//}
|
//}
|
||||||
|
@ -108,7 +109,7 @@ func (v *Dispatcher) Dispatch(ctx context.Context, destination net.Destination,
|
||||||
if outputStream != nil {
|
if outputStream != nil {
|
||||||
if err := outputStream.WriteMultiBuffer(buf.MultiBuffer{payload}); err != nil {
|
if err := outputStream.WriteMultiBuffer(buf.MultiBuffer{payload}); err != nil {
|
||||||
errors.LogInfoInner(ctx, err, "failed to write first UDP payload")
|
errors.LogInfoInner(ctx, err, "failed to write first UDP payload")
|
||||||
conn.Close()
|
// conn.Close()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -116,7 +117,7 @@ func (v *Dispatcher) Dispatch(ctx context.Context, destination net.Destination,
|
||||||
|
|
||||||
func handleInput(ctx context.Context, conn *connEntry, dest net.Destination, callback ResponseCallback, callClose func() error) {
|
func handleInput(ctx context.Context, conn *connEntry, dest net.Destination, callback ResponseCallback, callClose func() error) {
|
||||||
defer func() {
|
defer func() {
|
||||||
conn.Close()
|
// conn.Close()
|
||||||
if callClose != nil {
|
if callClose != nil {
|
||||||
callClose()
|
callClose()
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue