Remove incorrect validation of forwared messages

Messages are forwareded when received from another link, this means it's
too late to throw an error that bubbles up to the code trying to send
the incorrect message thus defeating the purpose of the validation.
This commit is contained in:
Hornwitser committed 2023-08-03 15:01:34 +02:00
1 parent 90798205e0
commit 3a321b39e1
1 file changed
-8
-8
View File
@@ -423,14 +423,6 @@ class Link {
}
forwardRequest(message, origin) {
if (this.validateSent) {
let entry = this.constructor._requestsByName.get(message.name);
if (!entry) {
throw new Error(`Attempt to forward unregistered Request ${message.name}`);
}
entry.requestFromJSON(message.data);
}
let pending = {
origin,
src: message.src,