From 1fe2151030003fe4e77968de1a5c57e7c8e9262a Mon Sep 17 00:00:00 2001 From: anlicheng <244108715@qq.com> Date: Wed, 10 Sep 2025 15:12:31 +0800 Subject: [PATCH] fix channel --- apps/efka/src/efka_service.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/efka/src/efka_service.erl b/apps/efka/src/efka_service.erl index 542fe28..a26a4b2 100644 --- a/apps/efka/src/efka_service.erl +++ b/apps/efka/src/efka_service.erl @@ -169,7 +169,7 @@ handle_cast({send_event, EventType, Params}, State = #state{service_id = Service handle_cast({push_config, Ref, ReceiverPid, ConfigJson}, State = #state{channel_pid = ChannelPid, service_id = ServiceId, inflight = Inflight, callbacks = Callbacks}) -> case is_pid(ChannelPid) andalso is_process_alive(ChannelPid) of true -> - tcp_channel:push_config(ChannelPid, Ref, self(), ConfigJson), + gen_channel:push_config(ChannelPid, Ref, self(), ConfigJson), %% 设置成功,需要更新微服务的配置 CB = fun() -> service_model:set_config(ServiceId, ConfigJson) end, {noreply, State#state{inflight = maps:put(Ref, ReceiverPid, Inflight), callbacks = maps:put(Ref, CB, Callbacks)}}; @@ -182,7 +182,7 @@ handle_cast({push_config, Ref, ReceiverPid, ConfigJson}, State = #state{channel_ handle_cast({invoke, Ref, ReceiverPid, Payload}, State = #state{channel_pid = ChannelPid, inflight = Inflight}) -> case is_pid(ChannelPid) andalso is_process_alive(ChannelPid) of true -> - tcp_channel:invoke(ChannelPid, Ref, self(), Payload), + gen_channel:invoke(ChannelPid, Ref, self(), Payload), {noreply, State#state{inflight = maps:put(Ref, ReceiverPid, Inflight)}}; false -> ReceiverPid ! {service_reply, Ref, {error, <<"channel is not alive">>}},