hhromic / e131-node

Node.js client/server library for the E1.31 (sACN) protocol
Apache License 2.0
28 stars 12 forks source link

Allow zero sequenceNumberDiff #10

Closed koopero closed 5 years ago

koopero commented 5 years ago

At least some sACN / e131 implementations seem to send the same sequence number for multiple packets across multiple universes. This has been observed with processing-eDMX.

By allowing a sequenceNumberDiff value of 0, these packets should be processed in acceptable order.

hhromic commented 5 years ago

Hi, thanks for your PR. Recently another PR #8 addressed a minor bug related to what you describe. In particular, e131-node didn't keep track of multiple universes when receiving packets hence the sequence numbers were mixed up. This is now fixed and individual seq numbers are properly tracked.

I just published an updated version of e131-node including this patch. Can you please try it now? It is possible that you PR is now obsolete after this fix. Thanks for testing!

koopero commented 5 years ago

Thanks for you quick response. Unfortunately, 1.1.2 is broken.

  this.universes.forEach(function (universe) {
    self._lastSequenceNumber[universe] = 0;
  });

  var self = this;

These two statement are in the wrong order.

hhromic commented 5 years ago

my bad! fixed now! please update to 1.1.3. thanks for reporting, let me know if your original issue is also fixed

koopero commented 5 years ago

Works like a charm!

Just tested with 4 universes from two different clients, processing-edmx and MadMapper.

Thanks for this module.