Commit d6c98866 by Iwasaki Yudai

Output proper log when upgrade fails

1 parent 45f8f611
Showing with 1 additions and 1 deletions
......@@ -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()
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!