Skip to content

Commit

Permalink
Output proper log when upgrade fails
Browse files Browse the repository at this point in the history
  • Loading branch information
yudai committed Aug 21, 2017
1 parent 45f8f61 commit d6c9886
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/handlers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit d6c9886

Please sign in to comment.