From d6c98866b9758f89ade3ed147437549ef0fdbf88 Mon Sep 17 00:00:00 2001 From: Iwasaki Yudai Date: Mon, 21 Aug 2017 15:36:23 +0900 Subject: [PATCH] Output proper log when upgrade fails --- server/handlers.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/handlers.go b/server/handlers.go index 1a48980..3c2793d 100644 --- a/server/handlers.go +++ b/server/handlers.go @@ -67,7 +67,7 @@ func (server *Server) generateHandleWS(ctx context.Context, cancel context.Cance conn, err := server.upgrader.Upgrade(w, r, nil) if err != nil { - closeReason = fmt.Sprintf("origin check error: %s", r.Header.Get("Origin")) + closeReason = err.Error() return } defer conn.Close()