node: fix stopping websocket rpc.Server #23211 (#1133)

This commit is contained in:
JukLee0ira 2025-06-23 15:58:25 +08:00 committed by GitHub
parent a189b3c36f
commit e966001937
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -261,7 +261,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()