mirror of
https://github.com/nttgin/BGPalerter.git
synced 2024-05-19 06:50:08 +00:00
fix issue with empty batches in connector
This commit is contained in:
@@ -71,10 +71,12 @@ export default class Connector {
|
||||
_sendBatch = () => {
|
||||
clearTimeout(this.timerBatch);
|
||||
delete this.timerBatch;
|
||||
const msg = this.name + "-" + '[' + this.batch.join(',') + ']';
|
||||
this.batch = [];
|
||||
if (this.messageCallback)
|
||||
this.messageCallback(msg);
|
||||
if (this.batch.length) {
|
||||
const msg = this.name + "-" + '[' + this.batch.join(',') + ']';
|
||||
this.batch = [];
|
||||
if (this.messageCallback)
|
||||
this.messageCallback(msg);
|
||||
}
|
||||
};
|
||||
|
||||
_message = (message) => {
|
||||
|
Reference in New Issue
Block a user