[FIX] App making calls to DDP after socket was killed by OS (#3062)
Co-authored-by: Gerzon Z <gerzonc@icloud.com>
This commit is contained in:
parent
fc52286bfa
commit
8f571fd029
|
@ -1140,7 +1140,7 @@ const RocketChat = {
|
||||||
methodCall(...args) {
|
methodCall(...args) {
|
||||||
return new Promise(async(resolve, reject) => {
|
return new Promise(async(resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const result = await this.sdk.methodCall(...args, this.code || '');
|
const result = await this.sdk?.methodCall(...args, this.code || '');
|
||||||
return resolve(result);
|
return resolve(result);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
if (e.error && (e.error === 'totp-required' || e.error === 'totp-invalid')) {
|
if (e.error && (e.error === 'totp-required' || e.error === 'totp-invalid')) {
|
||||||
|
|
Loading…
Reference in New Issue