1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-11-16 09:26:21 -05:00

small fixes

This commit is contained in:
Darien Raymond 2016-11-19 22:38:50 +01:00
parent 1169476e69
commit def8a19a7e
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

View File

@ -8,7 +8,6 @@ import (
"v2ray.com/core/app"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common/alloc"
v2io "v2ray.com/core/common/io"
"v2ray.com/core/common/log"
v2net "v2ray.com/core/common/net"
@ -48,8 +47,9 @@ func (this *OutboundProxy) Dial(src v2net.Address, dest v2net.Destination, optio
Stream: options.Stream,
})
}
log.Info("Proxy: Dialing to ", dest)
stream := ray.NewRay()
go handler.Dispatch(dest, alloc.NewLocalBuffer(32).Clear(), stream)
go handler.Dispatch(dest, nil, stream)
return NewProxyConnection(src, dest, stream), nil
}
@ -101,6 +101,8 @@ func (this *ProxyConnection) Close() error {
this.closed = true
this.stream.InboundInput().Close()
this.stream.InboundOutput().Release()
this.reader.Release()
this.writer.Release()
return nil
}