1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-26 15:39:08 -04:00

close outbound connections when context is done

This commit is contained in:
Darien Raymond
2017-01-28 21:24:46 +01:00
parent 9139a87865
commit fab20bb0cf
12 changed files with 45 additions and 28 deletions

View File

@@ -152,11 +152,9 @@ func (v *VMessOutboundHandler) Process(ctx context.Context, outboundRay ray.Outb
return nil
})
if err := signal.ErrorOrFinish2(requestDone, responseDone); err != nil {
if err := signal.ErrorOrFinish2(ctx, requestDone, responseDone); err != nil {
log.Info("VMess|Outbound: Connection ending with ", err)
conn.SetReusable(false)
input.CloseError()
output.CloseError()
return err
}