File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -319,6 +319,7 @@ int aeron_publication_image_create(
319
319
_image -> last_overrun_threshold = initial_position + (term_buffer_length / 2 );
320
320
_image -> time_of_last_packet_ns = now_ns ;
321
321
_image -> next_sm_deadline_ns = 0 ;
322
+ _image -> is_sm_enabled = true;
322
323
_image -> conductor_fields .clean_position = initial_position ;
323
324
_image -> conductor_fields .time_of_last_state_change_ns = now_ns ;
324
325
@@ -703,7 +704,7 @@ int aeron_publication_image_send_pending_status_message(aeron_publication_image_
703
704
int work_count = 0 ;
704
705
int64_t change_number ;
705
706
AERON_GET_ACQUIRE (change_number , image -> end_sm_change );
706
- const bool has_sm_timed_out = now_ns > image -> next_sm_deadline_ns ;
707
+ const bool has_sm_timed_out = image -> is_sm_enabled && image -> next_sm_deadline_ns < now_ns ;
707
708
708
709
if (NULL != image -> invalidation_reason )
709
710
{
@@ -1153,7 +1154,7 @@ void aeron_publication_image_stop_status_messages_if_not_active(aeron_publicatio
1153
1154
{
1154
1155
if (AERON_PUBLICATION_IMAGE_STATE_ACTIVE != image -> conductor_fields .state )
1155
1156
{
1156
- image -> next_sm_deadline_ns = INT64_MAX ;
1157
+ image -> is_sm_enabled = false ;
1157
1158
}
1158
1159
}
1159
1160
Original file line number Diff line number Diff line change @@ -138,6 +138,8 @@ typedef struct aeron_publication_image_stct
138
138
int64_t time_of_last_packet_ns ;
139
139
const char * invalidation_reason ;
140
140
141
+ bool is_sm_enabled ;
142
+
141
143
volatile int64_t response_session_id ;
142
144
143
145
volatile bool is_end_of_stream ;
You can’t perform that action at this time.
0 commit comments