Fix conn copy

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

View File

@ -262,7 +262,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 {