From 5e67bf9a2f82a2b23c8307bd6773fe778dc7a6bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mateusz=20Pi=C4=85tkowski?= Date: Fri, 9 Dec 2022 15:48:51 +0100 Subject: [PATCH] fix --- server/src/main.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/src/main.go b/server/src/main.go index cee6848..3a9856d 100644 --- a/server/src/main.go +++ b/server/src/main.go @@ -83,7 +83,6 @@ func timesync(hosts []string) []client { wg.Wait() close(responses) - fmt.Println("joł") clients := make([]client, 0, len(hosts)) for client := range responses { clients = append(clients, client) @@ -166,7 +165,7 @@ func main() { if strings.HasPrefix(resp, "start") { startTimeString := strings.TrimSpace(resp[len("start"):]) startTime := int64(0) - fmt.Scanf(startTimeString, "%d", &startTime) + fmt.Sscanf(startTimeString, "%d", &startTime) time.Sleep(time.Duration(startTime) * time.Millisecond) log.Println("Started #start") continue