RPCClient with lazyConnect

This commit is contained in:
DanB
2016-11-08 16:03:30 +01:00
parent d2afaba0a8
commit 37c853cb91
10 changed files with 27 additions and 16 deletions

View File

@@ -153,7 +153,7 @@ func startSmGeneric(internalSMGChan chan *sessionmanager.SMGeneric, internalRate
smgReplConns := make([]*sessionmanager.SMGReplicationConn, len(cfg.SmGenericConfig.SMGReplicationConns))
for i, replConnCfg := range cfg.SmGenericConfig.SMGReplicationConns {
if replCon, err := rpcclient.NewRpcClient("tcp", replConnCfg.Address, cfg.ConnectAttempts, cfg.Reconnects,
cfg.ConnectTimeout, cfg.ReplyTimeout, replConnCfg.Transport[1:], nil); err != nil {
cfg.ConnectTimeout, cfg.ReplyTimeout, replConnCfg.Transport[1:], nil, true); err != nil {
utils.Logger.Crit(fmt.Sprintf("<SMGeneric> Could not connect to SMGReplicationConn: <%s>, error: <%s>", replConnCfg.Address, err.Error()))
exitChan <- true
return