mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-20 06:54:41 +00:00
check tmsp client err and set mustConnect=false
This commit is contained in:
+1
-2
@@ -54,7 +54,6 @@ func NewRemoteClientCreator(addr, transport string, mustConnect bool) ClientCrea
|
||||
|
||||
func (r *remoteClientCreator) NewTMSPClient() (tmspcli.Client, error) {
|
||||
// Run forever in a loop
|
||||
fmt.Println("ADDR", r.addr, r.transport)
|
||||
remoteApp, err := tmspcli.NewClient(r.addr, r.transport, r.mustConnect)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("Failed to connect to proxy: %v", err)
|
||||
@@ -75,7 +74,7 @@ func DefaultClientCreator(config cfg.Config) ClientCreator {
|
||||
case "nilapp":
|
||||
return NewLocalClientCreator(nilapp.NewNilApplication())
|
||||
default:
|
||||
mustConnect := true
|
||||
mustConnect := false // loop retrying
|
||||
return NewRemoteClientCreator(addr, transport, mustConnect)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,6 +7,8 @@ import (
|
||||
|
||||
// Tendermint's interface to the application consists of multiple connections
|
||||
type AppConns interface {
|
||||
Service
|
||||
|
||||
Mempool() AppConnMempool
|
||||
Consensus() AppConnConsensus
|
||||
Query() AppConnQuery
|
||||
@@ -42,7 +44,6 @@ func NewMultiAppConn(config cfg.Config, clientCreator ClientCreator, state State
|
||||
clientCreator: clientCreator,
|
||||
}
|
||||
multiAppConn.QuitService = *NewQuitService(log, "multiAppConn", multiAppConn)
|
||||
multiAppConn.Start()
|
||||
return multiAppConn
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user