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

This commit is contained in:
Evolution404 2021-07-15 16:15:08 +08:00 committed by GitHub
parent f0b1bddac4
commit 89fde59a80
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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()