clean up on error

This commit is contained in:
v2ray committed 2016-05-07 00:19:06 +02:00
1 parent 0bc846f016
commit 8d1f06ebaf
2 files changed
+4 -6

No files matched your search

+1 -1
View File
@@ -22,6 +22,7 @@ func (this *FreedomConnection) Dispatch(destination v2net.Destination, payload *
defer payload.Release()
defer ray.OutboundInput().Release()
defer ray.OutboundOutput().Close()
var conn net.Conn
err := retry.Timed(5, 100).On(func() error {
@@ -56,7 +57,6 @@ func (this *FreedomConnection) Dispatch(destination v2net.Destination, payload *
go func() {
defer readMutex.Unlock()
defer output.Close()
var reader io.Reader = conn