mirror of
https://github.com/shadowsocks/shadowsocks-rust.git
synced 2026-11-14 08:14:45 +00:00
Fix tx/rx order for android RPC
This commit is contained in:
+2
-1
@@ -151,7 +151,8 @@ async fn flow_report_task(context: SharedContext) -> io::Result<()> {
|
||||
let tx = flow_stat.tcp().tx() + flow_stat.udp().tx();
|
||||
let rx = flow_stat.tcp().rx() + flow_stat.udp().rx();
|
||||
|
||||
let buf: [u64; 2] = [tx, rx];
|
||||
// first is rx, second is tx.
|
||||
let buf: [u64; 2] = [rx, tx];
|
||||
let buf = unsafe { slice::from_raw_parts(buf.as_ptr() as *const _, 16) };
|
||||
|
||||
match time::timeout(timeout, stream.write_all(buf)).await {
|
||||
|
||||
Reference in New Issue
Block a user