mirror of
https://github.com/TeaOSLab/EdgeNode.git
synced 2025-11-05 01:20:26 +08:00
修复源站Websocket源站读取失败导致的异常错误
This commit is contained in:
@@ -115,8 +115,8 @@ func (this *HTTPRequest) doWebsocket(requestHost string, isLastRetry bool) (shou
|
|||||||
// 读取第一个响应
|
// 读取第一个响应
|
||||||
var respReader = NewWebsocketResponseReader(originConn)
|
var respReader = NewWebsocketResponseReader(originConn)
|
||||||
resp, err := http.ReadResponse(bufio.NewReader(respReader), this.RawReq)
|
resp, err := http.ReadResponse(bufio.NewReader(respReader), this.RawReq)
|
||||||
if err != nil {
|
if err != nil || resp == nil {
|
||||||
if resp.Body != nil {
|
if resp != nil && resp.Body != nil {
|
||||||
_ = resp.Body.Close()
|
_ = resp.Body.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user