Skip to content

Commit

Permalink
Moved flags after error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
atheler committed Sep 25, 2023
1 parent fe414d8 commit c0a8625
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/roomsync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -592,7 +592,6 @@ impl YRoom {
}
}
Message::Sync(SyncMessage::SyncStep2(data)) => {
has_edits = true;
let update = match self.settings.protocol_version {
ProtocolVersion::V1 => Update::decode_v1(&data),
ProtocolVersion::V2 => Update::decode_v2(&data),
Expand All @@ -604,9 +603,9 @@ impl YRoom {
}
Err(e) => log::error!("Error decoding sync step 2: {}", e),
}
has_edits = true;
}
Message::Sync(SyncMessage::Update(data)) => {
has_edits = true;
let update = Update::decode_v1(&data);
match update {
Ok(update) => {
Expand All @@ -617,6 +616,7 @@ impl YRoom {
}
Err(e) => log::error!("Error decoding update: {}", e),
}
has_edits = true;
}
Message::Auth(_) => {
// TODO: check this. Always reply with permission granted
Expand Down

0 comments on commit c0a8625

Please sign in to comment.