Confirm relay readiness after reconstructing first FEC batch
This commit is contained in:
1 parent
ad20f954c5
commit
60aaa16327
2 files changed
+7
-2
No files matched your search
@@ -1466,7 +1466,7 @@ static void relay_tick(struct stream_network *net, uint64_t now) {
|
||||
if (local.finished && local.last == UINT64_MAX) {
|
||||
memcpy(r->end, local.end, STREAM_END_SIZE);
|
||||
relay_finish(net, r, STREAM_RELAY_ENDED, STREAM_REASON_STOPPED, now);
|
||||
} else {
|
||||
} else if (local.decoded) {
|
||||
uint8_t info[STREAM_INFO_SIZE + STREAM_PATH_MAX * 8] = {0};
|
||||
int available = 0;
|
||||
for (unsigned sub = 0; sub < local.descriptor.n && !available; sub++)
|
||||
@@ -1474,6 +1474,10 @@ static void relay_tick(struct stream_network *net, uint64_t now) {
|
||||
if (available) {
|
||||
r->status = STREAM_RELAY_READY; r->deadline_ms = now + STREAM_RELAY_HANDOFF_MS;
|
||||
r->dirty = r->urgent = 1;
|
||||
DEBUG_INFO(DEBUG_CATEGORY_STREAM, "relay ready after FEC source=%llx peer=%llx id=%llx start=%llu k=%u",
|
||||
(unsigned long long)r->descriptor.source_node_id, (unsigned long long)r->peer,
|
||||
(unsigned long long)r->id, (unsigned long long)local.start,
|
||||
(unsigned)(local.descriptor.n - local.descriptor.r));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user