forked from cerc-io/plugeth
node: fix stopping websocket rpc.Server (#23211)
This commit is contained in:
parent
f0b1bddac4
commit
89fde59a80
@ -251,7 +251,7 @@ func (h *httpServer) doStop() {
|
|||||||
|
|
||||||
// Shut down the server.
|
// Shut down the server.
|
||||||
httpHandler := h.httpHandler.Load().(*rpcHandler)
|
httpHandler := h.httpHandler.Load().(*rpcHandler)
|
||||||
wsHandler := h.httpHandler.Load().(*rpcHandler)
|
wsHandler := h.wsHandler.Load().(*rpcHandler)
|
||||||
if httpHandler != nil {
|
if httpHandler != nil {
|
||||||
h.httpHandler.Store((*rpcHandler)(nil))
|
h.httpHandler.Store((*rpcHandler)(nil))
|
||||||
httpHandler.server.Stop()
|
httpHandler.server.Stop()
|
||||||
|
Loading…
Reference in New Issue
Block a user