File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
sdk-core/src/main/java/org/fisco/bcos/sdk/network Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -76,11 +76,20 @@ public class ConnectionManager {
7676 private ScheduledExecutorService reconnSchedule = new ScheduledThreadPoolExecutor (1 );
7777
7878 public ConnectionManager (ConfigOption configOption , MsgHandler msgHandler ) {
79- for (String peerIpPort : configOption .getNetworkConfig ().getPeers ()) {
80- connectionInfoList .add (new ConnectionInfo (peerIpPort ));
79+ this (configOption .getNetworkConfig ().getPeers (), msgHandler );
80+ }
81+
82+ public ConnectionManager (List <String > ipList , MsgHandler msgHandler ) {
83+ if (ipList != null ) {
84+ for (String peerIpPort : ipList ) {
85+ connectionInfoList .add (new ConnectionInfo (peerIpPort ));
86+ }
8187 }
8288 channelHandler = new ChannelHandler (this , msgHandler );
83- logger .info (" all connections: {}" , connectionInfoList );
89+ logger .info (
90+ " all connections, size: {}, list: {}" ,
91+ connectionInfoList .size (),
92+ connectionInfoList );
8493 }
8594
8695 public void startConnect (ConfigOption configOption ) throws NetworkException {
You can’t perform that action at this time.
0 commit comments