diff --git a/common/remote/rpc/rpc_client.go b/common/remote/rpc/rpc_client.go index 515c639c..80b9ea8e 100644 --- a/common/remote/rpc/rpc_client.go +++ b/common/remote/rpc/rpc_client.go @@ -381,7 +381,9 @@ func (r *RpcClient) registerServerRequestHandlers() { func (r *RpcClient) Shutdown() { atomic.StoreInt32((*int32)(&r.rpcClientStatus), (int32)(SHUTDOWN)) r.closeConnection() + cMux.Lock() delete(clientMap, r.name) + cMux.Unlock() } func (r *RpcClient) RegisterServerRequestHandler(request func() rpc_request.IRequest, handler IServerRequestHandler) {