node-zserial 1.0.25 → 1.0.26

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/zserial.js +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-zserial",
3
- "version": "1.0.25",
3
+ "version": "1.0.26",
4
4
  "description": "Node-RED nodes to talk to serial ports",
5
5
  "dependencies": {
6
6
  "serialport": "^12.0.0"
package/zserial.js CHANGED
@@ -586,7 +586,7 @@ module.exports = function (RED) {
586
586
  var serialPool = (function () {
587
587
  var connections = {};
588
588
  var _zemitter = new events.EventEmitter();
589
-
589
+ _zemitter.setMaxListeners(500); // 设置最大监听器数量为500,防止警告
590
590
  return {
591
591
  on: function (event, callback) { _zemitter.on(event, callback); },
592
592
  off: function (event, callback) { _zemitter.off(event, callback); },