1
0
mirror of https://github.com/h3poteto/whalebird-desktop synced 2025-01-11 08:24:58 +01:00

refs #29 Stop old user streaming when start user streaming

This commit is contained in:
AkiraFukushima 2018-03-12 23:30:55 +09:00
parent 1b625d88ae
commit 0b46a736d6

View File

@ -137,6 +137,12 @@ ipcMain.on('start-user-streaming', (event, ac) => {
event.sender.send('error-start-user-streaming', err)
})
.then((account) => {
// Stop old user streaming
if (userStreaming !== null) {
userStreaming.stop()
userStreaming = null
}
userStreaming = new Streaming(account)
userStreaming.startUserStreaming(
(update) => {