File tree Expand file tree Collapse file tree 2 files changed +12
-13
lines changed
reference/async_reference Expand file tree Collapse file tree 2 files changed +12
-13
lines changed Original file line number Diff line number Diff line change @@ -237,6 +237,8 @@ TEST(AsyncRef, AddUpdateAndRemove) {
237
237
}
238
238
239
239
ecsact_async_disconnect ();
240
+
241
+ // NOTE: Maybe merging enqueues is affecting the callbacks?
240
242
}
241
243
242
244
TEST (AsyncRef, TryMergeFailure) {
Original file line number Diff line number Diff line change @@ -52,17 +52,7 @@ types::async_error tick_manager::validate_pending_options() {
52
52
return result;
53
53
}
54
54
55
- result.error =
56
- util::validate_merge_options (merged_options, pending.options );
57
-
58
- if (result.error != ECSACT_ASYNC_OK) {
59
- result.request_ids .push_back (pending.request_id );
60
- return result;
61
- }
62
-
63
- util::merge_options (merged_options, pending.options );
64
-
65
- result.error = upsert_validated_tick (merged_options, key);
55
+ result.error = upsert_validated_tick (pending.options , key);
66
56
67
57
if (result.error != ECSACT_ASYNC_OK) {
68
58
auto requests = util::get_request_ids_from_pending_exec_options (
@@ -84,8 +74,15 @@ ecsact_async_error tick_manager::upsert_validated_tick(
84
74
int32_t requested_tick
85
75
) {
86
76
if (validated_tick_map.contains (requested_tick)) {
87
- auto existing_options = validated_tick_map[requested_tick];
88
- return util::validate_merge_options (existing_options, validated_options);
77
+ auto & existing_options = validated_tick_map[requested_tick];
78
+ auto error =
79
+ util::validate_merge_options (existing_options, validated_options);
80
+ if (error == ECSACT_ASYNC_OK) {
81
+ util::merge_options (validated_options, existing_options);
82
+ existing_options = validated_options;
83
+ return error;
84
+ }
85
+ return error;
89
86
} else {
90
87
validated_tick_map.insert (std::pair (requested_tick, validated_options));
91
88
return ECSACT_ASYNC_OK;
You can’t perform that action at this time.
0 commit comments