@streamr/trackerless-network 103.7.0-rc.2 → 103.8.0-rc.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/exports.cjs CHANGED
@@ -29,7 +29,7 @@ class ExternalNetworkRpc {
29
29
  }
30
30
  }
31
31
 
32
- var version = "103.7.0-rc.2";
32
+ var version = "103.8.0-rc.3";
33
33
 
34
34
  // @generated message type with reflection information, may provide speed optimized methods
35
35
  class Any$Type extends runtime.MessageType {
@@ -2840,7 +2840,13 @@ class ContentDeliveryLayerNode extends eventemitter3.EventEmitter {
2840
2840
  else {
2841
2841
  logGapDiagnosticSampled('trackerless.cdNode.broadcastIn');
2842
2842
  }
2843
- this.emit('message', msg);
2843
+ // Deliver to local listeners — except own publishes (no previousNode)
2844
+ // when loopback is suppressed: nothing local consumes them and they
2845
+ // would otherwise be re-serialized across a worker boundary just to be
2846
+ // discarded. Propagation + duplicate detection below are unaffected.
2847
+ if (previousNode !== undefined || !this.options.suppressOwnMessageLoopback) {
2848
+ this.emit('message', msg);
2849
+ }
2844
2850
  const skipBackPropagation = previousNode !== undefined && !this.options.temporaryConnectionRpcLocal.hasNode(previousNode);
2845
2851
  this.options.propagation.feedUnseenMessage(msg, this.getPropagationTargets(msg), skipBackPropagation ? previousNode : null);
2846
2852
  this.messagesPropagated += 1;
@@ -4220,6 +4226,7 @@ class ContentDeliveryManager extends eventemitter3.EventEmitter {
4220
4226
  neighborUpdateInterval: this.options.neighborUpdateInterval,
4221
4227
  isLocalNodeEntryPoint,
4222
4228
  bufferWhileConnecting: this.options.bufferWhileConnecting,
4229
+ suppressOwnMessageLoopback: this.options.suppressOwnMessageLoopback,
4223
4230
  plumtreeOptimization: streamPartDeliveryOptions?.plumtreeOptimization?.enabled,
4224
4231
  plumtreeMaxPausedNeighbors: streamPartDeliveryOptions?.plumtreeOptimization?.enabled === true ?
4225
4232
  streamPartDeliveryOptions?.plumtreeOptimization?.maxPausedNeighbors : undefined