From 89fde59a8091670e50c99e2cf3de41051a4723f6 Mon Sep 17 00:00:00 2001 From: Evolution404 <35091674+Evolution404@users.noreply.github.com> Date: Thu, 15 Jul 2021 16:15:08 +0800 Subject: [PATCH] node: fix stopping websocket rpc.Server (#23211) --- node/rpcstack.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/node/rpcstack.go b/node/rpcstack.go index 56e23cc5c7..19490411b2 100644 --- a/node/rpcstack.go +++ b/node/rpcstack.go @@ -251,7 +251,7 @@ func (h *httpServer) doStop() { // Shut down the server. httpHandler := h.httpHandler.Load().(*rpcHandler) - wsHandler := h.httpHandler.Load().(*rpcHandler) + wsHandler := h.wsHandler.Load().(*rpcHandler) if httpHandler != nil { h.httpHandler.Store((*rpcHandler)(nil)) httpHandler.server.Stop()