Improve hijack failure error text

Include "hijack" in text to indicate where in this package the error
occurred.
This commit is contained in:
tebuka 2024-06-12 21:15:45 -07:00 committed by Daniel Holmes
parent 8890e3e578
commit 7e5e9b5a25
1 changed files with 2 additions and 1 deletions

View File

@ -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 {