Skip to content

Commit

Permalink
node: always show websocket url in logs (ethereum#22307)
Browse files Browse the repository at this point in the history
  • Loading branch information
holiman authored Feb 18, 2021
1 parent 9ec32a9 commit b1835b3
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 b1835b3

Please sign in to comment.