From b1835b3855ebee0aa8c63d18b8f0671168ceced5 Mon Sep 17 00:00:00 2001 From: Martin Holst Swende Date: Thu, 18 Feb 2021 10:40:19 +0100 Subject: [PATCH] node: always show websocket url in logs (#22307) --- node/rpcstack.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/node/rpcstack.go b/node/rpcstack.go index d693bb0bbd..56e23cc5c7 100644 --- a/node/rpcstack.go +++ b/node/rpcstack.go @@ -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.