Browse Source

Prevent Session.Destroy from leaving open TCP connections

pull/3077/head
Jared Wasinger 8 years ago
parent
commit
d2ef61d079
  1. 3
      api/api.go

3
api/api.go

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

Loading…
Cancel
Save