Fix rpc go routine leak
This commit is contained in:
@@ -285,8 +285,14 @@ func (h *httpTransportSocket) Recv(m *Message) error {
|
||||
|
||||
func (h *httpTransportSocket) Send(m *Message) error {
|
||||
if h.r.ProtoMajor == 1 {
|
||||
// make copy of header
|
||||
hdr := make(http.Header)
|
||||
for k, v := range h.r.Header {
|
||||
hdr[k] = v
|
||||
}
|
||||
|
||||
rsp := &http.Response{
|
||||
Header: h.r.Header,
|
||||
Header: hdr,
|
||||
Body: ioutil.NopCloser(bytes.NewReader(m.Body)),
|
||||
Status: "200 OK",
|
||||
StatusCode: 200,
|
||||
|
||||
Reference in New Issue
Block a user