Skip to content

Commit 889f187

Browse files
author
Erika Perugachi
authored
Merge pull request #1107 from erikaperugachi/fix
Fix socket
2 parents ee7f939 + 61448a2 commit 889f187

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

electron_app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "criptext",
3-
"version": "0.22.0",
3+
"version": "0.22.1",
44
"author": {
55
"name": "Criptext Inc",
66
"email": "[email protected]",

electron_app/src/socketClient.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,8 +126,14 @@ const checkAlive = () => {
126126
(err, stdout, stderr) => {
127127
let totalLost = 0;
128128
if (stdout) {
129-
const [lostPackages] = stdout.toString().match(percentRegex);
130-
totalLost = Number(lostPackages.replace('%', ''));
129+
const stdoutString = stdout.toString();
130+
if (stdoutString) {
131+
const match = stdoutString.match(percentRegex);
132+
if (match) {
133+
const [lostPackages] = match;
134+
totalLost = Number(lostPackages.replace('%', ''));
135+
}
136+
}
131137
}
132138
if (err !== null || !!stderr || totalLost > 50) {
133139
if (pingFailedCounter === 0) {

email_mailbox/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "email_mailbox",
3-
"version": "0.22.0",
3+
"version": "0.22.1",
44
"private": true,
55
"dependencies": {
66
"@criptext/electron-better-ipc": "^0.1.2-rc5",

0 commit comments

Comments
 (0)