File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 25
25
#define POLLING_INTERVAL_MS 20
26
26
27
27
// Wakeup timeout for dispatch thread, mainly for garbage collection of fragments
28
- #define DISPATCH_WAKEUP_TIMEOUT_MS 5000
28
+ #define DISPATCH_WAKEUP_TIMEOUT_S 5
29
29
30
30
// Mutex for sending, ie serial access
31
31
static pthread_mutex_t sending_mutex ;
@@ -106,7 +106,7 @@ static void * dispatch_indication(void * unused)
106
106
{
107
107
// Queue is empty, wait
108
108
clock_gettime (CLOCK_REALTIME , & ts );
109
- ts .tv_sec += DISPATCH_WAKEUP_TIMEOUT_MS ; // 5 second timeout
109
+ ts .tv_sec += DISPATCH_WAKEUP_TIMEOUT_S ; // 5 second timeout
110
110
pthread_cond_timedwait (& m_queue_not_empty_cond , & m_queue_mutex , & ts );
111
111
112
112
// Force a garbage collect (to be sure it's called even if no frag are received)
Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ static full_packet_t * m_packets = NULL;
64
64
65
65
// Keep track of the queue emptyness, to get info from other tasks
66
66
// True indicate that queue is empty, false indicate that queue is most probably not empty
67
- static bool m_is_queue_empty ;
67
+ static bool m_is_queue_empty = true ;
68
68
69
69
// Timestamp of last garbage collect
70
70
static unsigned long long m_last_gc_ts_ms ;
You can’t perform that action at this time.
0 commit comments