Skip to content

Commit

Permalink
node: show websocket url always
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman committed Feb 16, 2021
1 parent 1489c3f commit 59ad8b1
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions node/rpcstack.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,13 +144,15 @@ func (h *httpServer) start() error {
h.listener = listener
go h.server.Serve(listener)

// if server is websocket only, return after logging
if h.wsAllowed() && !h.rpcAllowed() {
if h.wsAllowed() {
url := fmt.Sprintf("ws://%v", listener.Addr())
if h.wsConfig.prefix != "" {
url += h.wsConfig.prefix
}
h.log.Info("WebSocket enabled", "url", url)
}
// if server is websocket only, return after logging
if !h.rpcAllowed() {
return nil
}
// Log http endpoint.
Expand Down

0 comments on commit 59ad8b1

Please sign in to comment.