1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-12-30 10:10:44 +02:00

Fix http transport panic (#2531)

* [fix] etcd config source prefix issue (#2389)

* http transport data race issue (#2436)

* [fix] #2431 http transport data race issue

* [feature] Ability to close connection while receiving.
Ability to send messages while receiving.
Icreased r channel limit to 100 to more fluently communication.
Do not dropp sent request if r channel is full.

* [fix] Read buff before reset it, when the connection is closed

Co-authored-by: Johnson C <chengqiaosheng@gmail.com>
Co-authored-by: Hunyadvári Péter <peter.hunyadvari@vcc.live>
This commit is contained in:
Ak-Army 2022-07-22 09:40:58 +02:00 committed by GitHub
parent e28f5b97f6
commit 48eae3b968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -153,12 +153,11 @@ func (h *httpTransportClient) Recv(m *Message) error {
}
h.Lock()
defer h.Unlock()
if h.closed {
h.Unlock()
return io.EOF
}
rsp, err := http.ReadResponse(h.buff, r)
h.Unlock()
if err != nil {
return err
}