mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-12-22 15:17:28 +00:00
Output proper log when upgrade fails
This commit is contained in:
parent
45f8f61103
commit
d6c98866b9
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user