From ed300d7032b0cc5d7df505d2c1bca0b68e4bbee2 Mon Sep 17 00:00:00 2001 From: Mike Kabischev Date: Fri, 10 Feb 2017 16:32:46 +0300 Subject: [PATCH] remove unused fields --- controller/endpoint/http.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/controller/endpoint/http.go b/controller/endpoint/http.go index ed343e6e..5364efad 100644 --- a/controller/endpoint/http.go +++ b/controller/endpoint/http.go @@ -19,15 +19,12 @@ const ( type HTTPEndpointConn struct { mu sync.Mutex ep Endpoint - ex bool - t time.Time client *http.Client } func newHTTPEndpointConn(ep Endpoint) *HTTPEndpointConn { return &HTTPEndpointConn{ ep: ep, - t: time.Now(), } } @@ -38,10 +35,7 @@ func (conn *HTTPEndpointConn) Expired() bool { func (conn *HTTPEndpointConn) Send(msg string) error { conn.mu.Lock() defer conn.mu.Unlock() - if conn.ex { - return errExpired - } - conn.t = time.Now() + if conn.client == nil { conn.client = &http.Client{ Transport: &http.Transport{