1
0
forked from hrfee/waybar-mpris

change order of writers in io.Multiwriter

io.MultiWriter (i think) thinks dataWrite.Write fails, and so doesn't
continue writing to all other outputs. This just makes it the last one,
should fix .
This commit is contained in:
Harvey Tindall 2021-05-21 16:03:33 +01:00
parent 49b3212c48
commit fe851278f4
Signed by untrusted user: hrfee
GPG Key ID: BBC65952848FB1A2

View File

@ -484,9 +484,9 @@ func listenForCommands(players *players) {
players,
}
if isSharing {
WRITER = io.MultiWriter(SHAREWRITER, DATAWRITER, os.Stdout)
WRITER = io.MultiWriter(os.Stdout, SHAREWRITER, DATAWRITER)
} else {
WRITER = io.MultiWriter(DATAWRITER, os.Stdout)
WRITER = io.MultiWriter(os.Stdout, DATAWRITER)
}
isDataSharing = true
}