Closed lukyer closed 8 years ago
According to debug output, it is probably caused because of every command issued on the same channel sets .tag to the same value. Then error is probably returned by mikrotik because of that same tag id.
Create a pull request in my repo (https://github.com/f5eng/mikronode-ng) and I'll test and merge it, then publish to npm (mikronode-ng).
Thanks for your work on this code base. I have, in the past couple of months, updated to ES2015 code syntax and wrote a babel plugin to provide private class properties. In addition, I have changed the socket reader, sentence parser, connection, and channel data configuration to use RxJS streams. It does still support events.
Also, this issue has a configurable result with a new option (closeOnTrap).
If error occurs during 1. write(), no other write() can end with success. Both callback/promise approaches are problematic.
Example:
Expected result: Command failed: no such command() Interface/IP: ether2-master-local/10.245.235.1/24 Interface/IP: internal-mikrotik/192.168.88.1/24
Obtained result: Command failed: no such command() Command failed: no such command()