skokov3812 / encrypted-smiley-secure-protocol

Node.JS library Encrypted Smiley ® Secure Protocol (eSSP, SSP)
MIT License
39 stars 32 forks source link

Sequence Count get random value when connected to 2 devices #22

Closed iagolobla closed 3 years ago

iagolobla commented 3 years ago

I have 2 devices connected with the module. Each one has an object with a different port. They should work separately, however, after a while with both devices enabled, one of them start getting sequence count numbers (like ACKs) totally random (even negative numbers) so the communication fails.

Also, if I duplicate the module locally and use each copy for each device it works perfectly. I guess there's some kind of interference.

Thank you for this module and keep working. Nice work! Best Regards, Iago Loureiro.

kybarg commented 3 years ago

@iagolobla I guess this is related to global event emitter https://github.com/skokov3812/encrypted-smiley-secure-protocol/blob/6b5be83540c7db012455c3438473a2c26808c7de/src/index.js#L11