Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flush qlog streamer before closing the connection #1629

Merged
merged 2 commits into from
Dec 13, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fixup: errors/warnings
  • Loading branch information
LPardue committed Dec 4, 2023
commit 02f82514c26934f9a78e1275b071d9770625928c
22 changes: 4 additions & 18 deletions quiche/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1625,21 +1625,6 @@ macro_rules! push_frame_to_pkt {
}};
}

/// Conditional qlog actions.
///
/// Executes the provided body if the qlog feature is enabled and quiche
/// has been configured with a log writer.
macro_rules! qlog_with {
($qlog:expr, $qlog_streamer_ref:ident, $body:block) => {{
#[cfg(feature = "qlog")]
{
if let Some($qlog_streamer_ref) = &mut $qlog.streamer {
$body
}
}
}};
}

/// Executes the provided body if the qlog feature is enabled, quiche has been
/// configured with a log writer, the event's importance is within the
/// configured level.
Expand Down Expand Up @@ -7433,9 +7418,10 @@ impl Connection {

// Marks the connection as closed and does any related tidyup.
fn mark_closed(&mut self) {
qlog_with!(self.qlog, q, {
q = None;
});
#[cfg(feature = "qlog")]
{
self.qlog.streamer = None;
}
self.closed = true;
}
}
Expand Down
Loading