From f63a4eec38adcd632dd8cdaabc9e34b8b5b74d08 Mon Sep 17 00:00:00 2001 From: iamqizhao Date: Mon, 23 Feb 2015 11:51:15 -0800 Subject: [PATCH] rename an error --- clientconn.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/clientconn.go b/clientconn.go index 97c3a93bd..2e9d18fca 100644 --- a/clientconn.go +++ b/clientconn.go @@ -46,9 +46,9 @@ import ( var ( // ErrUnspecTarget indicates that the target address is unspecified. ErrUnspecTarget = errors.New("grpc: target is unspecified") - // ErrClosingConn indicates that the operation is illegal because the session - // is closing. - ErrClosingConn = errors.New("grpc: the client connection is closing") + // ErrClientConnClosing indicates that the operation is illegal because + // the session is closing. + ErrClientConnClosing = errors.New("grpc: the client connection is closing") ) type dialOptions struct { @@ -126,7 +126,7 @@ func (cc *ClientConn) resetTransport(closeTransport bool) error { cc.transportSeq = 0 if cc.closing { cc.mu.Unlock() - return ErrClosingConn + return ErrClientConnClosing } cc.mu.Unlock() if closeTransport { @@ -180,7 +180,7 @@ func (cc *ClientConn) wait(ctx context.Context, ts int) (transport.ClientTranspo switch { case cc.closing: cc.mu.Unlock() - return nil, 0, ErrClosingConn + return nil, 0, ErrClientConnClosing case ts < cc.transportSeq: // Worked on a dying transport. Try the new one immediately. defer cc.mu.Unlock()