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">>}},