configure datadir on context

This commit is contained in:
Aiden McClelland
2021-09-03 14:03:08 -06:00
committed by Aiden McClelland
parent ee381ebce7
commit 3877e43b84
33 changed files with 664 additions and 276 deletions

View File

@@ -3,6 +3,7 @@ pub mod util;
use std::future::Future;
use std::sync::Arc;
use std::time::Duration;
use futures::{FutureExt, SinkExt, StreamExt};
use patch_db::json_ptr::JsonPointer;
@@ -85,6 +86,12 @@ async fn ws_handler<
_ => (),
}
}
_ = tokio::time::sleep(Duration::from_secs(10)).fuse() => {
stream
.send(Message::Ping(Vec::new()))
.await
.with_kind(crate::ErrorKind::Network)?;
}
}
}
}