-
Notifications
You must be signed in to change notification settings - Fork 756
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
Conversation
This looks good, but I think it might even better to implement the |
Yeah Drop sounds good. |
7fd6762
to
08874a9
Compare
@ghedo @LPardue I have updated the code to implement |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few nits but looking good. Also please rebase.
bb2b33e
to
20884eb
Compare
quiche/src/lib.rs
Outdated
qlog_with!(self.qlog, _q, { | ||
self.qlog.streamer = None; | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qlog_with!(self.qlog, _q, { | |
self.qlog.streamer = None; | |
}); | |
qlog_with!(self.qlog, q, { | |
q = None; | |
}); |
this should work
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! Not writing Rust usually 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok sorry that didn't work, my bad. Let me try something else
# Motivation I was debugging some connection problems and enabled qlog; however, often I did not get output. My use-case is going through the FFI layer which instantiates a `BufferedWriter` for the file. After looking through the code a bit it appears that the `QLogStreamer` is not flushed on all close paths which can lead to missing logs. # Modification Make sure that on every close path the streamer is flushed and closed as well.
20884eb
to
5a97133
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM now, thanks.
We'll probably hold on merging just this moment in order to batch up some other qlog-reated changes.
Motivation
I was debugging some connection problems and enabled qlog; however, often I did not get output. My use-case is going through the FFI layer which instantiates a
BufferedWriter
for the file. After looking through the code a bit it appears that theQLogStreamer
is not flushed on all close paths which can lead to missing logs.Modification
Make sure that on every close path the streamer is flushed and closed as well.