mirror of
https://github.com/sorenisanerd/gotty.git
synced 2024-11-09 23:34:26 +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)
|
conn, err := server.upgrader.Upgrade(w, r, nil)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
closeReason = fmt.Sprintf("origin check error: %s", r.Header.Get("Origin"))
|
closeReason = err.Error()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
defer conn.Close()
|
defer conn.Close()
|
||||||
|
Loading…
Reference in New Issue
Block a user