Skip to content

Commit

Permalink
fix: ws namespaces split only if something is provided (#1379)
Browse files Browse the repository at this point in the history
  • Loading branch information
V-Staykov authored Oct 30, 2024
1 parent 35ef74c commit 8dba040
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion turbo/cli/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,11 @@ func setEmbeddedRpcDaemon(ctx *cli.Context, cfg *nodecfg.Config, logger log.Logg
apis := ctx.String(utils.HTTPApiFlag.Name)

wsEnabled := ctx.IsSet(utils.WSEnabledFlag.Name)
wsApis := strings.Split(ctx.String(utils.WSApiFlag.Name), ",")
wsApisCtx := ctx.String(utils.WSApiFlag.Name)
wsApis := []string{}
if len(wsApisCtx) > 0 {
wsApis = strings.Split(wsApisCtx, ",")
}
if wsEnabled {
log.Info("starting WS APIs", "APIs", wsApis)
}
Expand Down

0 comments on commit 8dba040

Please sign in to comment.