remove unnecessary await

pull/317/head
sachaaaaa 6 years ago
parent 03e7fb82e6
commit 37e95cf7d2

@ -217,8 +217,8 @@
} }
} }
async function startLocalLokiServer() { function startLocalLokiServer() {
const pems = await window.getSelfSignedCert(); const pems = window.getSelfSignedCert();
window.localLokiServer = new window.LocalLokiServer(pems); window.localLokiServer = new window.LocalLokiServer(pems);
} }
@ -232,7 +232,7 @@
first = false; first = false;
if (Whisper.Registration.isDone()) { if (Whisper.Registration.isDone()) {
await startLocalLokiServer(); startLocalLokiServer();
} }
window.lokiP2pAPI = new window.LokiP2pAPI( window.lokiP2pAPI = new window.LokiP2pAPI(
@ -551,7 +551,7 @@
Whisper.events.on('registration_done', async () => { Whisper.events.on('registration_done', async () => {
window.log.info('handling registration event'); window.log.info('handling registration event');
await startLocalLokiServer(); startLocalLokiServer();
// listeners // listeners
Whisper.RotateSignedPreKeyListener.init(Whisper.events, newVersion); Whisper.RotateSignedPreKeyListener.init(Whisper.events, newVersion);

@ -130,9 +130,10 @@ class LocalLokiServer extends EventEmitter {
}); });
for (let publicPort = portStart; publicPort <= portEnd; publicPort += 1) { for (let publicPort = portStart; publicPort <= portEnd; publicPort += 1) {
if (publicPortsInUse.includes(publicPort)) if (publicPortsInUse.includes(publicPort)) {
// eslint-disable-next-line no-continue // eslint-disable-next-line no-continue
continue; continue;
}
const p = new Promise((resolve, reject) => { const p = new Promise((resolve, reject) => {
this.upnpClient.portMapping({ this.upnpClient.portMapping({
public: publicPort, public: publicPort,

Loading…
Cancel
Save