1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2025-12-26 20:15:26 -05: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

@@ -83,7 +83,7 @@ func (d *DokodemoDoor) Process(ctx context.Context, network net.Network, conn in
return nil
})
if err := signal.ErrorOrFinish2(requestDone, responseDone); err != nil {
if err := signal.ErrorOrFinish2(ctx, requestDone, responseDone); err != nil {
inboundRay.InboundInput().CloseError()
inboundRay.InboundOutput().CloseError()
log.Info("Dokodemo: Connection ends with ", err)