Browse Source

Flush TCP connection after sending message

tags/v0.2.0-candidate
Philipp Oppermann 2 years ago
parent
commit
0aebe9c3c4
Failed to extract signature
1 changed files with 1 additions and 0 deletions
  1. +1
    -0
      apis/rust/node/src/daemon/tcp.rs

+ 1
- 0
apis/rust/node/src/daemon/tcp.rs View File

@@ -42,6 +42,7 @@ fn tcp_send(connection: &mut (impl Write + Unpin), message: &[u8]) -> std::io::R
let len_raw = (message.len() as u64).to_le_bytes();
connection.write_all(&len_raw)?;
connection.write_all(message)?;
connection.flush()?;
Ok(())
}



Loading…
Cancel
Save