@@ -21,6 +21,7 @@ static volatile uint32_t _server_shutting_down_state = 0;
2121static ep_rt_wait_event_handle_t _server_resume_runtime_startup_event = { 0 };
2222static bool _server_disabled = false;
2323static volatile bool _is_paused_for_startup = false;
24+ static volatile bool _server_loop_initialized = false;
2425
2526static
2627inline
@@ -113,6 +114,10 @@ server_warning_callback (
113114}
114115
115116static size_t server_loop_tick (void * data ) {
117+ if (!_server_loop_initialized ) {
118+ _server_loop_initialized = true;
119+ DS_LOG_INFO_0 ("DiagnosticServer - IPC server loop initialized." );
120+ }
116121 if (server_volatile_load_shutting_down_state ())
117122 return 1 ; // done
118123 DiagnosticsIpcStream * stream = ds_ipc_stream_factory_get_next_available_stream (server_warning_callback );
@@ -122,10 +127,13 @@ static size_t server_loop_tick (void* data) {
122127 ds_rt_auto_trace_signal ();
123128
124129 DiagnosticsIpcMessage message ;
125- if (!ds_ipc_message_init (& message ))
130+ if (!ds_ipc_message_init (& message )) {
131+ DS_LOG_INFO_0 ("DiagnosticServer - Failed to initialize IPC message." );
126132 return 0 ; // continue
133+ }
127134
128135 if (!ds_ipc_message_initialize_stream (& message , stream )) {
136+ DS_LOG_INFO_0 ("DiagnosticServer - Failed to initialize IPC message from stream." );
129137 ds_ipc_message_send_error (stream , DS_IPC_E_BAD_ENCODING );
130138 ds_ipc_stream_free (stream );
131139 ds_ipc_message_fini (& message );
@@ -135,7 +143,7 @@ static size_t server_loop_tick (void* data) {
135143 if (ep_rt_utf8_string_compare (
136144 (const ep_char8_t * )ds_ipc_header_get_magic_ref (ds_ipc_message_get_header_ref (& message )),
137145 (const ep_char8_t * )DOTNET_IPC_V1_MAGIC ) != 0 ) {
138-
146+ DS_LOG_INFO_0 ( "DiagnosticServer - Received IPC message with unknown magic." );
139147 ds_ipc_message_send_error (stream , DS_IPC_E_UNKNOWN_MAGIC );
140148 ds_ipc_stream_free (stream );
141149 ds_ipc_message_fini (& message );
0 commit comments