From 11e535cd27eaff11895cba920d6d857739d7ad20 Mon Sep 17 00:00:00 2001 From: "M. Mert Yildiran" Date: Thu, 12 May 2022 13:32:18 +0300 Subject: [PATCH] Use `copy` instead of assignment --- tap/tcp_reader.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tap/tcp_reader.go b/tap/tcp_reader.go index 471c2513d..3f9d014a2 100644 --- a/tap/tcp_reader.go +++ b/tap/tcp_reader.go @@ -83,7 +83,7 @@ func (reader *tcpReader) isProtocolIdentified() bool { } func (reader *tcpReader) rewind() { - reader.data = reader.pastData + copy(reader.data, reader.pastData) } func (reader *tcpReader) Read(p []byte) (int, error) {