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

Commit 283afb28 authored by Cédric Moreau's avatar Cédric Moreau
Browse files

[fix] #1116 Do not start a new stream with a WS2P connection which is not connected yet

parent 8d5c1ed9
......@@ -32,6 +32,7 @@ export class WS2PStreamer extends stream.Transform {
}
} catch (e) {
logger.warn('WS2P >> Streamer >>', e)
this.ws2pc.close()
}
done && done();
}
......
......@@ -22,9 +22,15 @@ export class WS2PClient {
},
expectedPub
)
// Streaming
const streamer = new WS2PStreamer(c)
server.pipe(streamer)
c.connected
.then(() => {
// Streaming
server.pipe(streamer)
})
.catch(() => {
server.unpipe(streamer)
})
c.closed.then(() => {
server.unpipe(streamer)
})
......
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