Fix tx/rx order for android RPC

This commit is contained in:
Max Lv
2020-03-13 23:46:44 +08:00
committed by Y. T. CHUNG
parent b5840e31bc
commit 205eaa95ad
+2 -1
View File
@@ -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 {