small fixes

pull/314/head
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
1 changed files with 4 additions and 2 deletions

View File

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