Add busy status to center
This commit is contained in:
@@ -13,6 +13,7 @@ export class Center extends SmppSession {
|
|||||||
"WAITING CONNECTION",
|
"WAITING CONNECTION",
|
||||||
"CONNECTING",
|
"CONNECTING",
|
||||||
"CONNECTED",
|
"CONNECTED",
|
||||||
|
"BUSY"
|
||||||
];
|
];
|
||||||
_username: string;
|
_username: string;
|
||||||
_password: string;
|
_password: string;
|
||||||
@@ -88,9 +89,11 @@ export class Center extends SmppSession {
|
|||||||
|
|
||||||
let count = job.count || 1;
|
let count = job.count || 1;
|
||||||
let interval = 1 / (job.perSecond || 1);
|
let interval = 1 / (job.perSecond || 1);
|
||||||
|
this.setStatus(3);
|
||||||
this.sendTimer.setInterval(() => {
|
this.sendTimer.setInterval(() => {
|
||||||
if (count > 0 && counter >= count) {
|
if (count > 0 && counter >= count) {
|
||||||
this.cancelSendInterval();
|
this.cancelSendInterval();
|
||||||
|
this.setStatus(2);
|
||||||
} else {
|
} else {
|
||||||
this.sendPdu(job.pdu, true);
|
this.sendPdu(job.pdu, true);
|
||||||
counter++;
|
counter++;
|
||||||
|
Reference in New Issue
Block a user