pull/165/head
Mikunj 7 years ago
parent 8526c6dd92
commit 4518e95619

@ -7,6 +7,7 @@
/* global storage: false */ /* global storage: false */
/* global textsecure: false */ /* global textsecure: false */
/* global Whisper: false */ /* global Whisper: false */
/* global lokiP2pAPI: false */
/* eslint-disable more/no-then */ /* eslint-disable more/no-then */

@ -16,7 +16,10 @@ class LokiP2pAPI extends EventEmitter {
? 60 * 1000 // 1 minute ? 60 * 1000 // 1 minute
: 2 * 60 * 1000; // 2 minutes : 2 * 60 * 1000; // 2 minutes
if (this.contactP2pDetails[pubKey] && this.contactP2pDetails[pubKey].pingTimer) { if (
this.contactP2pDetails[pubKey] &&
this.contactP2pDetails[pubKey].pingTimer
) {
clearTimeout(this.contactP2pDetails[pubKey].pingTimer); clearTimeout(this.contactP2pDetails[pubKey].pingTimer);
} }
this.contactP2pDetails[pubKey] = { this.contactP2pDetails[pubKey] = {
@ -67,7 +70,9 @@ class LokiP2pAPI extends EventEmitter {
} }
isOnline(pubKey) { isOnline(pubKey) {
return !!(this.contactP2pDetails[pubKey] && this.contactP2pDetails[pubKey].isOnline); return !!(
this.contactP2pDetails[pubKey] && this.contactP2pDetails[pubKey].isOnline
);
} }
pingContact(pubKey) { pingContact(pubKey) {

Loading…
Cancel
Save