From 8bd00db15d320fb8e3ee1ca04d0e2a65ddb89c44 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Sat, 18 Jul 2015 00:09:28 +0200 Subject: improved log output diff --git a/src/helsinki.at/rhrdtime/rhrdtime.go b/src/helsinki.at/rhrdtime/rhrdtime.go index bae588a..58ba896 100644 --- a/src/helsinki.at/rhrdtime/rhrdtime.go +++ b/src/helsinki.at/rhrdtime/rhrdtime.go @@ -91,11 +91,12 @@ func handleTimeUpdateClient(w http.ResponseWriter, r *http.Request, ps *pubsub.P fmt.Println(err) return } - fmt.Println("Client connected", ws.RemoteAddr()) + fmt.Println("Client", ws.RemoteAddr(), "connected") go func() { for { if _, _, err := ws.NextReader(); err != nil { + fmt.Println("Client", ws.RemoteAddr(), "disconnected:", err) ws.Close() break } -- cgit v0.10.2