change order of writers in io.Multiwriter
All checks were successful
continuous-integration/drone/push Build is passing

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 #4.
This commit is contained in:
Harvey Tindall 2021-05-21 16:03:33 +01:00
parent 49b3212c48
commit fe851278f4
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

View File

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