Fix conn copy

This commit is contained in:
Mahdi 2025-04-03 11:40:43 +03:30 committed by 世界
parent 97d41ffde8
commit 991e755789
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4

View File

@ -246,7 +246,7 @@ func (m *ConnectionManager) connectionCopy(ctx context.Context, source net.Conn,
return
}
}
_, err := bufio.CopyWithCounters(destination, sourceReader, source, readCounters, writeCounters)
_, err := bufio.CopyWithCounters(destinationWriter, sourceReader, source, readCounters, writeCounters)
if err != nil {
common.Close(source, destination)
} else if duplexDst, isDuplex := destination.(N.WriteCloser); isDuplex {