You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dubbo.apache.org by zt...@apache.org on 2021/11/29 05:51:12 UTC

[dubbo-go-pixiu] branch develop updated: All adaptors initialized at initAdapters(), so call it once is enough. (#308)

This is an automated email from the ASF dual-hosted git repository.

ztelur pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/dubbo-go-pixiu.git


The following commit(s) were added to refs/heads/develop by this push:
     new 737b896  All adaptors initialized at initAdapters(), so call it once is enough. (#308)
737b896 is described below

commit 737b896076f498182f2a1dd9401932d6f768da1c
Author: ma642 <ma...@126.com>
AuthorDate: Mon Nov 29 13:51:04 2021 +0800

    All adaptors initialized at initAdapters(), so call it once is enough. (#308)
    
    Co-authored-by: mazhihui <ma...@unipus.cn>
---
 pkg/server/adapter_manager.go | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/pkg/server/adapter_manager.go b/pkg/server/adapter_manager.go
index 5600ffc..0fb84b3 100644
--- a/pkg/server/adapter_manager.go
+++ b/pkg/server/adapter_manager.go
@@ -31,10 +31,7 @@ type AdapterManager struct {
 
 func CreateDefaultAdapterManager(server *Server, bs *model.Bootstrap) *AdapterManager {
 	am := &AdapterManager{configs: bs.StaticResources.Adapters}
-	sr := bs.StaticResources
-	for _, ad := range sr.Adapters {
-		am.initAdapters(server, ad)
-	}
+	am.initAdapters()
 	return am
 }
 
@@ -50,7 +47,7 @@ func (am *AdapterManager) Stop() {
 	}
 }
 
-func (am *AdapterManager) initAdapters(server *Server, ad *model.Adapter) {
+func (am *AdapterManager) initAdapters() {
 
 	var ads []adapter.Adapter