diff --git a/transport/simple-obfs/tls.go b/transport/simple-obfs/tls.go index f41e32637..20166bbec 100644 --- a/transport/simple-obfs/tls.go +++ b/transport/simple-obfs/tls.go @@ -28,10 +28,10 @@ type TLSObfs struct { func (to *TLSObfs) read(b []byte, discardN int) (int, error) { buf := pool.Get(discardN) _, err := io.ReadFull(to.Conn, buf) + pool.Put(buf) if err != nil { return 0, err } - pool.Put(buf) sizeBuf := make([]byte, 2) _, err = io.ReadFull(to.Conn, sizeBuf)