We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1dd5c41 commit 812e340Copy full SHA for 812e340
server/src/stats.rs
@@ -313,7 +313,7 @@ impl StatsMgr {
313
latest_save_ts = now;
314
if !resp.servers.is_empty() {
315
if let Ok(mut file) = File::create("stats.json") {
316
- file.write(serde_json::to_string(&resp).unwrap().as_bytes());
+ file.write_all(serde_json::to_string(&resp).unwrap().as_bytes());
317
file.flush();
318
trace!("save stats.json succ!");
319
} else {
0 commit comments