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

Reentry after ack_packet() on receive path #228

Merged
merged 1 commit into from
Dec 5, 2024
Merged
Changes from all commits
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
8 changes: 8 additions & 0 deletions src/udx.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,10 @@ process_packet (udx_socket_t *socket, char *buf, ssize_t buf_len, struct sockadd
delivered = process_sacks(stream, buf, header_len);
}

if (stream->status & UDX_STREAM_DEAD) {
return 1;
}

// Done with header processing now.
// For future compat, make sure we are now pointing at the actual data using the data_offset
if (data_offset) {
Expand Down Expand Up @@ -1383,6 +1387,10 @@ process_packet (udx_socket_t *socket, char *buf, ssize_t buf_len, struct sockadd
// TODO: make this work as well, if the ack packet is lost, ie
// have some internal (capped) queue of "gracefully closed" streams (TIME_WAIT)

if (stream->status & UDX_STREAM_DEAD) {
return 1;
}

if ((stream->status & UDX_STREAM_ALL_ENDED) == UDX_STREAM_ALL_ENDED) {
close_stream(stream, 0);
return 1;
Expand Down
Loading