mirror of https://github.com/gorilla/websocket.git
Improve hijack failure error text
Include "hijack" in text to indicate where in this package the error occurred.
This commit is contained in:
parent
22bd06da63
commit
4378cca251
|
@ -174,7 +174,8 @@ func (u *Upgrader) Upgrade(w http.ResponseWriter, r *http.Request, responseHeade
|
|||
|
||||
netConn, brw, err := http.NewResponseController(w).Hijack()
|
||||
if err != nil {
|
||||
return u.returnError(w, r, http.StatusInternalServerError, err.Error())
|
||||
return u.returnError(w, r, http.StatusInternalServerError,
|
||||
"websocket: hijack: "+err.Error())
|
||||
}
|
||||
|
||||
if brw.Reader.Buffered() > 0 {
|
||||
|
|
Loading…
Reference in New Issue