diff --git a/protocol/dubbo/pool.go b/protocol/dubbo/pool.go
index 546a5b335aee3e71a6e00e49888710edb20c694a..ecd57e466a01b361a429cfd7d6eef4a3345574df 100644
--- a/protocol/dubbo/pool.go
+++ b/protocol/dubbo/pool.go
@@ -275,6 +275,7 @@ func (p *gettyRPCClientPool) close() {
 func (p *gettyRPCClientPool) getGettyRpcClient(protocol, addr string) (*gettyRPCClient, error) {
 
 	p.Lock()
+	defer p.Unlock()
 	if p.conns == nil {
 		return nil, errClientPoolClosed
 	}
@@ -290,12 +291,9 @@ func (p *gettyRPCClientPool) getGettyRpcClient(protocol, addr string) (*gettyRPC
 			continue
 		}
 		conn.created = now //update created time
-
-		p.Unlock()
 		return conn, nil
 	}
 	// create new conn
-	p.Unlock()
 	return newGettyRPCClientConn(p, protocol, addr)
 }