After eyeballing lingering requests, clean up requests after the response to an async (non-streaming) request is done.
This commit is contained in:
parent
f01f7a5ab9
commit
929ae1b709
@ -785,7 +785,7 @@ void tf_ssb_connection_rpc_send(tf_ssb_connection_t* connection, uint8_t flags,
|
|||||||
_tf_ssb_connection_box_stream_send(connection, combined, 1 + 2 * sizeof(uint32_t) + size);
|
_tf_ssb_connection_box_stream_send(connection, combined, 1 + 2 * sizeof(uint32_t) + size);
|
||||||
tf_free(combined);
|
tf_free(combined);
|
||||||
connection->ssb->rpc_out++;
|
connection->ssb->rpc_out++;
|
||||||
if (flags & k_ssb_rpc_flag_end_error)
|
if ((flags & k_ssb_rpc_flag_end_error) || (request_number < 0 && !(flags & k_ssb_rpc_flag_stream)))
|
||||||
{
|
{
|
||||||
tf_ssb_connection_remove_request(connection, request_number);
|
tf_ssb_connection_remove_request(connection, request_number);
|
||||||
}
|
}
|
||||||
@ -1551,6 +1551,10 @@ static void _tf_ssb_connection_rpc_recv(tf_ssb_connection_t* connection, uint8_t
|
|||||||
callback(connection, flags, request_number, val, message, size, user_data);
|
callback(connection, flags, request_number, val, message, size, user_data);
|
||||||
POST_CALLBACK(connection->ssb, callback);
|
POST_CALLBACK(connection->ssb, callback);
|
||||||
tf_trace_end(connection->ssb->trace);
|
tf_trace_end(connection->ssb->trace);
|
||||||
|
if (!(flags & k_ssb_rpc_flag_stream))
|
||||||
|
{
|
||||||
|
tf_ssb_connection_remove_request(connection, -request_number);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (JS_IsObject(val))
|
else if (JS_IsObject(val))
|
||||||
|
Loading…
Reference in New Issue
Block a user