summaryrefslogtreecommitdiffstats
path: root/contrib/restricted/aws/aws-c-event-stream/source/event_stream_rpc_server.c
diff options
context:
space:
mode:
authorrobot-contrib <[email protected]>2025-07-05 09:07:48 +0300
committerrobot-contrib <[email protected]>2025-07-05 09:32:43 +0300
commitd39c61aee0928bd6ff45b74c44a5703dae4e47ae (patch)
tree80d2758d21e12acd823edd28d163f1836917e7cd /contrib/restricted/aws/aws-c-event-stream/source/event_stream_rpc_server.c
parent8bd56b64a4c4a94d91c8a9518883513c9d6075f9 (diff)
Update contrib/restricted/aws/aws-c-event-stream to 0.5.5
commit_hash:8307bd2fe419c4785e2cf1b39f6127b9f71b54cf
Diffstat (limited to 'contrib/restricted/aws/aws-c-event-stream/source/event_stream_rpc_server.c')
-rw-r--r--contrib/restricted/aws/aws-c-event-stream/source/event_stream_rpc_server.c27
1 files changed, 20 insertions, 7 deletions
diff --git a/contrib/restricted/aws/aws-c-event-stream/source/event_stream_rpc_server.c b/contrib/restricted/aws/aws-c-event-stream/source/event_stream_rpc_server.c
index e8af15e7da0..0a9ad31c345 100644
--- a/contrib/restricted/aws/aws-c-event-stream/source/event_stream_rpc_server.c
+++ b/contrib/restricted/aws/aws-c-event-stream/source/event_stream_rpc_server.c
@@ -901,13 +901,26 @@ static void s_route_message_by_type(
struct aws_hash_element *continuation_element = NULL;
if (aws_hash_table_find(&connection->continuation_table, &stream_id, &continuation_element) ||
!continuation_element) {
- AWS_LOGF_ERROR(
- AWS_LS_EVENT_STREAM_RPC_SERVER,
- "id=%p: stream_id does not have a corresponding continuation",
- (void *)connection);
- aws_raise_error(AWS_ERROR_EVENT_STREAM_RPC_PROTOCOL_ERROR);
- s_send_connection_level_error(
- connection, AWS_EVENT_STREAM_RPC_MESSAGE_TYPE_PROTOCOL_ERROR, 0, &s_invalid_client_stream_id_error);
+ if ((message_flags & AWS_EVENT_STREAM_RPC_MESSAGE_FLAG_TERMINATE_STREAM) == 0) {
+ AWS_LOGF_ERROR(
+ AWS_LS_EVENT_STREAM_RPC_SERVER,
+ "id=%p: stream_id does not have a corresponding continuation",
+ (void *)connection);
+ aws_raise_error(AWS_ERROR_EVENT_STREAM_RPC_PROTOCOL_ERROR);
+ s_send_connection_level_error(
+ connection,
+ AWS_EVENT_STREAM_RPC_MESSAGE_TYPE_PROTOCOL_ERROR,
+ 0,
+ &s_invalid_client_stream_id_error);
+ } else {
+ /* Simultaneous close can trip this condition */
+ AWS_LOGF_DEBUG(
+ AWS_LS_EVENT_STREAM_RPC_SERVER,
+ "id=%p: received a terminate stream message for stream_id %d, which no longer has a "
+ "corresponding continuation",
+ (void *)connection,
+ (int)stream_id);
+ }
return;
}