mirror of
https://github.com/tendermint/tendermint.git
synced 2026-10-01 04:05:45 +00:00
rpc/client/http: drop endpoint arg from New and add WSOptions (#6176)
also - replace `MaxReconnectAttempts`, `ReadWait`, `WriteWait` and `PingPeriod` options with `WSOptions` in `WSClient` (rpc/jsonrpc/client/ws_client.go). - set default write wait to 10s for `WSClient`(rpc/jsonrpc/client/ws_client.go) - unexpose `WSEvents`(rpc/client/http.go) Closes #6162
This commit is contained in:
@@ -59,7 +59,7 @@ func dumpCmdHandler(_ *cobra.Command, args []string) error {
|
||||
}
|
||||
}
|
||||
|
||||
rpc, err := rpchttp.New(nodeRPCAddr, "/websocket")
|
||||
rpc, err := rpchttp.New(nodeRPCAddr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create new http client: %w", err)
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ go-routine state, and the node's WAL and config information. This aggregated dat
|
||||
is packaged into a compressed archive.
|
||||
|
||||
Example:
|
||||
$ tendermint debug 34255 /path/to/tm-debug.zip`,
|
||||
$ tendermint debug kill 34255 /path/to/tm-debug.zip`,
|
||||
Args: cobra.ExactArgs(2),
|
||||
RunE: killCmdHandler,
|
||||
}
|
||||
@@ -44,7 +44,7 @@ func killCmdHandler(cmd *cobra.Command, args []string) error {
|
||||
return errors.New("invalid output file")
|
||||
}
|
||||
|
||||
rpc, err := rpchttp.New(nodeRPCAddr, "/websocket")
|
||||
rpc, err := rpchttp.New(nodeRPCAddr)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create new http client: %w", err)
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ func runProxy(cmd *cobra.Command, args []string) error {
|
||||
cfg.WriteTimeout = config.RPC.TimeoutBroadcastTxCommit + 1*time.Second
|
||||
}
|
||||
|
||||
rpcClient, err := rpchttp.NewWithTimeout(primaryAddr, "/websocket", cfg.WriteTimeout)
|
||||
rpcClient, err := rpchttp.NewWithTimeout(primaryAddr, cfg.WriteTimeout)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create http client for %s: %w", primaryAddr, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user