Commit a7bc1cfe authored by Andreas Schmidt's avatar Andreas Schmidt

Wake up delivery store in all cases.

parent 9489f5c2
Pipeline #2777 passed with stages
in 1 minute and 40 seconds
......@@ -322,7 +322,7 @@ int32_t PrrtSocket_receive_asap_wait(PrrtSocket *s, void *buf_ptr, struct sockad
PrrtPace_track_start(s->appDeliverPace);
PrrtPacket *packet;
do {
struct timespec deadline = abstime_from_now(100 * 1000);
struct timespec deadline = abstime_from_now(10 * 1000);
packet = PrrtPacketDeliveryStore_get_packet_timedwait(s->packetDeliveryStore, 0, MAX_TIMESTAMP, &deadline);
if (packet == NULL && errno == ETIMEDOUT) {
errno = 0;
......
......@@ -152,10 +152,7 @@ bool PrrtPacketDeliveryStore_insert(PrrtPacketDeliveryStore *store, PrrtPacket *
prrtTimestamp_t timeout = PrrtDataPacket_packet_timeout(packet);
store->tree = BPTree_insert(store->tree, timeout, packet);
bool packet_awaited = (PrrtTimestamp_cmp(store->last_start, timeout) <= 0) && (PrrtTimestamp_cmp(timeout, store->last_stop) <= 0);
if (!store->in_ordered_wait || packet_awaited) {
pthread_cond_broadcast(&store->wait_for_data);
}
pthread_cond_broadcast(&store->wait_for_data);
check(pthread_mutex_unlock(&store->lock) == EXIT_SUCCESS, "Unlock failed.");
return true;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment