Mise à jour de GitLab prévue ce samedi 23 octobre 2021 à partir de 9h00 CET

Commit 1229aef6 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] WS2P logging

parent c9883975
......@@ -31,7 +31,7 @@ export class WS2PStreamer extends stream.Transform {
await this.ws2pc.pushPeer(obj)
}
} catch (e) {
logger.warn(e)
logger.warn('WS2P >> Streamer >>', e)
}
done && done();
}
......
......@@ -571,17 +571,21 @@ export class WS2PConnection {
await this.connect()
return new Promise((resolve, reject) => {
this.nbPushsToRemoteCount++
this.ws.send(JSON.stringify({
body: {
name: WS2P_PUSH[type],
[key]: data
}
}), async (err:any) => {
if (err) {
return reject(err)
}
resolve()
})
try {
this.ws.send(JSON.stringify({
body: {
name: WS2P_PUSH[type],
[key]: data
}
}), async (err:any) => {
if (err) {
return reject(err)
}
resolve()
})
} catch (e) {
reject(e)
}
})
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment