-
Notifications
You must be signed in to change notification settings - Fork 204
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
fix: improve logging #1573
fix: improve logging #1573
Conversation
Codecov Report
@@ Coverage Diff @@
## main #1573 +/- ##
=======================================
Coverage 85.73% 85.73%
=======================================
Files 950 950
Lines 22745 22761 +16
Branches 3978 3982 +4
=======================================
+ Hits 19500 19514 +14
- Misses 3060 3062 +2
Partials 185 185
|
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.
Hi @ericvergnaud . Thanks for those log additions, to me, it's always hard to evaluate right place to log and not overlog. :)
Hi, |
9c06a80
to
723211d
Compare
Signed-off-by: Eric Vergnaud <[email protected]>
Signed-off-by: Eric Vergnaud <[email protected]>
Signed-off-by: Eric Vergnaud <[email protected]>
Signed-off-by: Eric Vergnaud <[email protected]>
Signed-off-by: Eric Vergnaud <[email protected]>
…1559) Signed-off-by: Niall Shaw <[email protected]> Signed-off-by: Eric Vergnaud <[email protected]>
…-foundation#1564) Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: Eric Vergnaud <[email protected]>
Signed-off-by: Eric Vergnaud <[email protected]>
b4d1164
to
4816165
Compare
@jakubkoci hey, any chance we can finalize this ? Looks like 'main' is evolving rapidly making it more difficult to merge every day ? |
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 @ericvergnaud ! I think it is more than just an improvement of logging, as it now handles a possible error when sending a message through a WebSocket. In regards to that I'd like to make sure that the method won't return unless it is sure it could write on the socket. Maybe it is already doing so, but there are also other possibilities (like using rxjs
magic as we do in other parts of the framework) to wait for the callback execution and return.
Co-authored-by: Ariel Gentile <[email protected]> Signed-off-by: ericvergnaud <[email protected]>
Co-authored-by: Ariel Gentile <[email protected]> Signed-off-by: ericvergnaud <[email protected]>
Co-authored-by: Ariel Gentile <[email protected]> Signed-off-by: ericvergnaud <[email protected]>
Co-authored-by: Ariel Gentile <[email protected]> Signed-off-by: ericvergnaud <[email protected]>
Co-authored-by: Ariel Gentile <[email protected]> Signed-off-by: ericvergnaud <[email protected]>
@genaris re #1573 (comment) yes the callback is only called after send completes, see https://github.com/websockets/ws/blob/master/doc/ws.md#websocketsenddata-options-callback |
It is clear to me that the callback is called after socket is written, but my question is if this procedure is done synchronously: will the function will block until it gets a successful or failed status on the write operation?
So I'm wondering if Anyway, apart from this curiosity, I still see the unrelated changes in this PR. You'll need to rebase/merge your branch proerly, otherwise it will not be possible to merge it into main once approved. |
In my understanding and experience, |
I'll try rebasing |
Rebasing done |
As long as the error is thrown on the same context of the caller, I'm OK with it. |
…#1573) Signed-off-by: Eric Vergnaud <[email protected]> Signed-off-by: Ariel Gentile <[email protected]>
…#1573) Signed-off-by: Eric Vergnaud <[email protected]> Signed-off-by: Martin Auer <[email protected]>
…#1573) Signed-off-by: Eric Vergnaud <[email protected]> Signed-off-by: Martin Auer <[email protected]>
No description provided.