mirror of
https://github.com/fluencelabs/tendermint
synced 2025-06-21 17:01:35 +00:00
Decouple StartHTTP{,AndTLS}Server from Listen() (#2791)
* Decouple StartHTTP{,AndTLS}Server from Listen() This should help solve cosmos/cosmos-sdk#2715 * Fix small mistake * Update StartGRPCServer * s/rpc/rpcserver/ * Start grpccore.StartGRPCServer in a goroutine * Reinstate l.Close() * Fix rpc/lib/test/main.go * Update code comment * update changelog and comments * fix tm-monitor. more comments
This commit is contained in:
committed by
Ethan Buchman
parent
be8c2d5018
commit
b646437ec7
@ -28,11 +28,11 @@ func main() {
|
||||
cdc := amino.NewCodec()
|
||||
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout))
|
||||
rpcserver.RegisterRPCFuncs(mux, routes, cdc, logger)
|
||||
_, err := rpcserver.StartHTTPServer("0.0.0.0:8008", mux, logger, rpcserver.Config{})
|
||||
listener, err := rpcserver.Listen("0.0.0.0:8008", rpcserver.Config{})
|
||||
if err != nil {
|
||||
cmn.Exit(err.Error())
|
||||
}
|
||||
|
||||
go rpcserver.StartHTTPServer(listener, mux, logger)
|
||||
// Wait forever
|
||||
cmn.TrapSignal(func() {
|
||||
})
|
||||
|
Reference in New Issue
Block a user