File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed
Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -211,13 +211,20 @@ int epg_fetch_async(int epfd) {
211211
212212 logger (LOG_INFO , "Starting async EPG fetch from: %s" , epg_cache .url );
213213
214- /* Start async fetch with fd-based callback (zero-copy) */
214+ /* Start async fetch with fd-based callback (zero-copy)
215+ * Note: file:// URLs complete synchronously and return NULL (callback already
216+ * invoked) */
215217 fetch_ctx = http_fetch_start_async_fd (epg_cache .url , epg_fetch_fd_callback ,
216218 NULL , epfd );
217- if (!fetch_ctx ) {
218- logger (LOG_ERROR , "Failed to start async fetch for EPG" );
219- epg_cache .fetch_error_count ++ ;
220- return -1 ;
219+
220+ /* NULL return value can mean:
221+ * 1. file:// URL completed synchronously (callback already called) - SUCCESS
222+ * 2. Error occurred (callback called with error) - also handled
223+ * Non-NULL means HTTP(S) fetch started successfully and is in progress */
224+ if (fetch_ctx ) {
225+ logger (LOG_DEBUG , "Async HTTP(S) fetch started, waiting for completion" );
226+ } else {
227+ logger (LOG_DEBUG , "Fetch completed immediately (likely file:// URL)" );
221228 }
222229
223230 return 0 ;
You can’t perform that action at this time.
0 commit comments