Closed TingDaoK closed 3 months ago
Attention: Patch coverage is 90.90909%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 79.61%. Comparing base (
7db2452
) to head (791c582
).
Files | Patch % | Lines |
---|---|---|
source/websocket.c | 90.90% | 2 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
The bug was introduced in PR #474
is_writing_stopped = true
shouldn't be set directly, there's a helper functions_stop_writing()
that ensures subsequent calls toaws_websocket_send_frame()
will fail.Let's take a whole new approach these channel-shutdown-window-deadlock issues:
s_stop_reading_and_dont_block_shutdown()
function that setsis_reading_stopped = true
, but also increments the read window so that channel shutdown won't deadlock.is_reading_stopped = true
now use this helper insteadaws_channel_shutdown()
is called. Lots of channel behavior has changed since this websocket code was written.aws_channel_shutdown()
s_schedule_channel_shutdown_from_offthead()
aws_websocket_close()
, or when the refcount goes to zero, we can assume the user is OK if reading stops, and it can calls_stop_reading_and_dont_block_shutdown()
on the way to shutting down.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.