mirror of
https://github.com/hexedtech/codemp.git
synced 2024-12-23 05:14:54 +01:00
fix: don't trigger on self change, smaller siteid
also set woot dep rev because cache
This commit is contained in:
parent
ca29ee3e0f
commit
5208ff65c0
3 changed files with 4 additions and 4 deletions
|
@ -10,7 +10,7 @@ name = "codemp"
|
|||
# core
|
||||
tracing = "0.1"
|
||||
# woot
|
||||
codemp-woot = { git = "ssh://git@github.com/codewithotherpeopleandchangenamelater/woot.git", branch = "dev", optional = true }
|
||||
codemp-woot = { git = "ssh://git@github.com/codewithotherpeopleandchangenamelater/woot.git", rev = "f971807c742579e0e89eb7ee4330f7b2edcc35c7", optional = true }
|
||||
# proto
|
||||
tonic = { version = "0.9", features = ["tls", "tls-roots"], optional = true }
|
||||
prost = { version = "0.11.8", optional = true }
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
use std::sync::Arc;
|
||||
|
||||
use tokio::sync::{watch, mpsc, Mutex, RwLock, TryLockError};
|
||||
use tokio::sync::{watch, mpsc, RwLock};
|
||||
use tonic::async_trait;
|
||||
|
||||
use crate::errors::IgnorableError;
|
||||
|
|
|
@ -43,7 +43,7 @@ impl BufferControllerWorker {
|
|||
operations: op_rx,
|
||||
receiver: txt_rx,
|
||||
sender: op_tx,
|
||||
buffer: Woot::new(site_id, ""), // TODO initialize with buffer!
|
||||
buffer: Woot::new(site_id % (2<<10), ""), // TODO remove the modulo, only for debugging!
|
||||
path: path.to_string(),
|
||||
stop: end_rx,
|
||||
stop_control: end_tx,
|
||||
|
@ -123,7 +123,7 @@ impl ControllerWorker<TextChange> for BufferControllerWorker {
|
|||
match self.send_op(&mut tx, &op).await {
|
||||
Err(e) => tracing::error!("server refused to broadcast {}: {}", op, e),
|
||||
Ok(()) => {
|
||||
self.content.send(self.buffer.view()).unwrap_or_warn("could not send buffer update");
|
||||
// self.content.send(self.buffer.view()).unwrap_or_warn("could not send buffer update");
|
||||
},
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue