Susumu Yata
null+****@clear*****
Fri Jul 21 16:19:19 JST 2017
Susumu Yata 2017-07-21 16:19:19 +0900 (Fri, 21 Jul 2017) New Revision: e0d0ce4251db4908d20db2fa2a73c7d4fc43b1d8 https://github.com/groonga/grnci/commit/e0d0ce4251db4908d20db2fa2a73c7d4fc43b1d8 Message: Keep an address string as is. Modified files: v2/gqtp.go Modified: v2/gqtp.go (+3 -7) =================================================================== --- v2/gqtp.go 2017-07-21 16:18:00 +0900 (9f5c545) +++ v2/gqtp.go 2017-07-21 16:19:19 +0900 (f081e82) @@ -391,17 +391,13 @@ func (c *GQTPConn) Query(cmd *Command) (Response, error) { // GQTPClient is a thread-safe GQTP client. type GQTPClient struct { - addr *Address + addr string idleConns chan *GQTPConn } // NewGQTPClient returns a new GQTPClient connected to a GQTP server. // The expected address format is [scheme://][host][:port]. func NewGQTPClient(addr string) (*GQTPClient, error) { - a, err := ParseGQTPAddress(addr) - if err != nil { - return nil, err - } conn, err := DialGQTP(addr) if err != nil { return nil, err @@ -409,7 +405,7 @@ func NewGQTPClient(addr string) (*GQTPClient, error) { conns := make(chan *GQTPConn, gqtpMaxIdleConns) conns <- conn return &GQTPClient{ - addr: a, + addr: addr, idleConns: conns, }, nil } @@ -438,7 +434,7 @@ func (c *GQTPClient) exec(cmd string, body io.Reader) (Response, error) { select { case conn = <-c.idleConns: default: - conn, err = DialGQTP(c.addr.String()) + conn, err = DialGQTP(c.addr) if err != nil { return nil, err } -------------- next part -------------- HTML����������������������������...Download