We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fdc53dc commit bf2e646Copy full SHA for bf2e646
src/types/packet.ts
@@ -261,7 +261,15 @@ export function sendPacket(
261
return edge.otherEnd(originId) === destinationId;
262
});
263
if (firstEdge === undefined) {
264
- firstEdge = originConnections[0];
+ firstEdge = originConnections.find((edge) => {
265
+ return isRouter(viewgraph.datagraph.getDevice(edge.otherEnd(originId)));
266
+ });
267
+ }
268
+ if (firstEdge === undefined) {
269
+ console.warn(
270
+ "El dispositivo de origen no está conectado al destino o a un router.",
271
+ );
272
+ return;
273
}
274
packet.traverseEdge(firstEdge, originId);
275
0 commit comments