aboutsummaryrefslogtreecommitdiffstats
path: root/src/swarm
diff options
context:
space:
mode:
Diffstat (limited to 'src/swarm')
-rw-r--r--src/swarm/sync.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/swarm/sync.rs b/src/swarm/sync.rs
index 65a02ea..c953752 100644
--- a/src/swarm/sync.rs
+++ b/src/swarm/sync.rs
@@ -405,6 +405,9 @@ pub(crate) async fn handle_sync(
// Changes pushed along a tree (`SyncBody::Changes`): their heads and bytes, made
// into the Automerge message that would have brought them (`Received::pushed`).
let (payload, deflated, pushed) = match envelope.body {
+ // Of a document of another kind: none this node holds, which a peer holding
+ // one isn't let near (`peer::inbound`).
+ transport::SyncBody::Kind(_) => return Ok(()),
transport::SyncBody::Message(payload) => (payload, false, None),
transport::SyncBody::Deflated(payload) => (payload, true, None),
transport::SyncBody::Changes { heads, changes } => {