Commit 3023245c4f75f2ffc9ab3fbb7b8d89012d165108

Authored by Adhidarma Hadiwinoto
1 parent edb8b6e81d
Exists in master

Pengamanan tambahan

Showing 2 changed files with 3 additions and 1 deletions Side-by-side Diff

... ... @@ -189,6 +189,8 @@ async function registerSignalStrengthBackgroundQuery() {
189 189 }
190 190  
191 191 async function sendSMS(destination, msg) {
  192 + if (typeof destination !== 'string' || typeof msg !== 'string' || !destination.trim() || !msg.trim()) return;
  193 +
192 194 await mutex.setLockWaitForCommand();
193 195 logger.info('Sending message', { destination, msg });
194 196  
... ... @@ -36,7 +36,7 @@ function releaseLockWaitForCommand() {
36 36 } catch (e) {
37 37 //
38 38 }
39   - }, 1500);
  39 + }, 2000);
40 40 }
41 41  
42 42 exports.setLockWaitForOK = setLockWaitForOK;