Track forwarded requests to notify if link dies

Keep track of requests that have been forwarded over a link in a similar
manner to requests that were initiated on a link in order to properly
return an error response to the sender of the request if the link goes
down while the request is still pending at the forwarded node.
This commit is contained in:
Hornwitser committed 2023-07-25 21:01:48 +02:00
1 parent 0f9224a4ef
commit cb21a63ac2
4 files changed
+59 -14

No files matched your search

+5 -1
View File
@@ -84,7 +84,11 @@ class ControllerRouter {
}
if (nextHop) {
nextHop.connector.send(message);
if (message.type === "request") {
nextHop.forwardRequest(message, origin);
} else {
nextHop.connector.send(message);
}
} else {
this.warnUnrouted(message, msg);
}