Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed May 12, 2024
1 parent 61b7c43 commit 0598c1c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/v5/dispatcher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,6 +548,7 @@ where
Err(err) => {
// do not handle nested error
if error {
inner.sink.drop_sink();

Check warning on line 551 in src/v5/dispatcher.rs

View check run for this annotation

Codecov / codecov/patch

src/v5/dispatcher.rs#L551

Added line #L551 was not covered by tests
return Err(err);
} else {
// handle error from control service
Expand All @@ -562,20 +563,19 @@ where
}
};

if error {
let response = if error {
if let Some(pkt) = result.packet {
let _ = inner.sink.encode_packet(pkt);
}
if result.disconnect {
inner.sink.drop_sink();
}
Ok(None)
} else {
if result.disconnect {
inner.sink.drop_sink();
}
Ok(result.packet)
};

if result.disconnect {
inner.sink.drop_sink();
}
response
}

#[cfg(test)]
Expand Down

0 comments on commit 0598c1c

Please sign in to comment.