mirror of
https://github.com/tendermint/tendermint.git
synced 2026-09-19 14:34:17 +00:00
rpc.StartHTTPServer listener bug fix
This commit is contained in:
@@ -137,6 +137,8 @@ func (l *DefaultListener) ExternalAddress() *NetAddress {
|
||||
return l.extAddr
|
||||
}
|
||||
|
||||
// NOTE: The returned listener is already Accept()'ing.
|
||||
// So it's not suitable to pass into http.Serve().
|
||||
func (l *DefaultListener) NetListener() net.Listener {
|
||||
return l.listener
|
||||
}
|
||||
|
||||
@@ -77,11 +77,13 @@ func makeSwitchPair(t testing.TB, initSwitch func(*Switch) *Switch) (*Switch, *S
|
||||
s1.SetNodeInfo(&types.NodeInfo{
|
||||
Moniker: "switch1",
|
||||
Network: "testing",
|
||||
Version: "123.123.123",
|
||||
})
|
||||
s2 := initSwitch(NewSwitch())
|
||||
s2.SetNodeInfo(&types.NodeInfo{
|
||||
Moniker: "switch2",
|
||||
Network: "testing",
|
||||
Version: "123.123.123",
|
||||
})
|
||||
|
||||
// Start switches
|
||||
|
||||
Reference in New Issue
Block a user