Browse Source

Merge pull request #3077 from jwasinger/issue-2850

Prevent Session.Destroy from leaving open TCP connections
pull/3118/head
James Phillips 8 years ago committed by GitHub
parent
commit
3baa703d02
  1. 3
      api/api.go

3
api/api.go

@ -7,6 +7,7 @@ import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net"
"net/http"
@ -648,6 +649,8 @@ func (c *Client) write(endpoint string, in, out interface{}, q *WriteOptions) (*
if err := decodeBody(resp, &out); err != nil {
return nil, err
}
} else if _, err := ioutil.ReadAll(resp.Body); err != nil {
return nil, err
}
return wm, nil
}

Loading…
Cancel
Save