mirror of https://github.com/tidwall/tile38.git
remove unused fields
This commit is contained in:
parent
009c52d365
commit
ed300d7032
|
@ -19,15 +19,12 @@ const (
|
||||||
type HTTPEndpointConn struct {
|
type HTTPEndpointConn struct {
|
||||||
mu sync.Mutex
|
mu sync.Mutex
|
||||||
ep Endpoint
|
ep Endpoint
|
||||||
ex bool
|
|
||||||
t time.Time
|
|
||||||
client *http.Client
|
client *http.Client
|
||||||
}
|
}
|
||||||
|
|
||||||
func newHTTPEndpointConn(ep Endpoint) *HTTPEndpointConn {
|
func newHTTPEndpointConn(ep Endpoint) *HTTPEndpointConn {
|
||||||
return &HTTPEndpointConn{
|
return &HTTPEndpointConn{
|
||||||
ep: ep,
|
ep: ep,
|
||||||
t: time.Now(),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,10 +35,7 @@ func (conn *HTTPEndpointConn) Expired() bool {
|
||||||
func (conn *HTTPEndpointConn) Send(msg string) error {
|
func (conn *HTTPEndpointConn) Send(msg string) error {
|
||||||
conn.mu.Lock()
|
conn.mu.Lock()
|
||||||
defer conn.mu.Unlock()
|
defer conn.mu.Unlock()
|
||||||
if conn.ex {
|
|
||||||
return errExpired
|
|
||||||
}
|
|
||||||
conn.t = time.Now()
|
|
||||||
if conn.client == nil {
|
if conn.client == nil {
|
||||||
conn.client = &http.Client{
|
conn.client = &http.Client{
|
||||||
Transport: &http.Transport{
|
Transport: &http.Transport{
|
||||||
|
|
Loading…
Reference in New Issue