mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-23 16:50:47 +00:00
ptp: Check once a second for timeouts
While the minimum timeout duration is 5s, checking only every 5s means that we would notice this 4.9s too late in the worst case. Checking once a second reduces this considerably while keeping the number of wakeups still low. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5520>
This commit is contained in:
parent
9ba8107ec6
commit
d6adaccf6d
1 changed files with 2 additions and 2 deletions
|
@ -2472,8 +2472,8 @@ ptp_helper_main (gpointer data)
|
|||
STDERR_MESSAGE_HEADER_SIZE, G_PRIORITY_DEFAULT, NULL,
|
||||
(GAsyncReadyCallback) have_stderr_header, NULL);
|
||||
|
||||
/* Check all 5 seconds, if we have to cleanup ANNOUNCE or pending syncs message */
|
||||
cleanup_source = g_timeout_source_new_seconds (5);
|
||||
/* Check every 1 seconds, if we have to cleanup ANNOUNCE or pending syncs message */
|
||||
cleanup_source = g_timeout_source_new_seconds (1);
|
||||
g_source_set_priority (cleanup_source, G_PRIORITY_DEFAULT);
|
||||
g_source_set_callback (cleanup_source, (GSourceFunc) cleanup_cb, NULL, NULL);
|
||||
g_source_attach (cleanup_source, main_context);
|
||||
|
|
Loading…
Reference in a new issue