mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-06-12 11:29:36 +03:00
Fix: CounterConnection with ReadV/WriteV (#720)
Co-authored-by: JimhHan <50871214+JimhHan@users.noreply.github.com>
This commit is contained in:
@ -50,7 +50,7 @@ func NewCryptionWriter(stream cipher.Stream, writer io.Writer) *CryptionWriter {
|
||||
func (w *CryptionWriter) Write(data []byte) (int, error) {
|
||||
w.stream.XORKeyStream(data, data)
|
||||
|
||||
if err := buf.WriteAllBytes(w.writer, data); err != nil {
|
||||
if err := buf.WriteAllBytes(w.writer, data, nil); err != nil {
|
||||
return 0, err
|
||||
}
|
||||
return len(data), nil
|
||||
|
Reference in New Issue
Block a user