From fe851278f4e08c8c7bda8344f0a9790a35487554 Mon Sep 17 00:00:00 2001 From: Harvey Tindall Date: Fri, 21 May 2021 16:03:33 +0100 Subject: [PATCH] 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 #4. --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 08f58c7..6fa3844 100644 --- a/main.go +++ b/main.go @@ -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 }