From 4d2e0535520bf2dc5c021628a5d5414a5123c8c7 Mon Sep 17 00:00:00 2001 From: anlicheng Date: Wed, 9 Aug 2023 16:44:45 +0800 Subject: [PATCH] fi --- apps/iot/src/iot_host.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/iot/src/iot_host.erl b/apps/iot/src/iot_host.erl index d3ba532..8724357 100644 --- a/apps/iot/src/iot_host.erl +++ b/apps/iot/src/iot_host.erl @@ -176,7 +176,7 @@ handle_event({call, From}, {publish_message, ReceiverPid, CommandType, {aes, Com {keep_state, State, [{reply, From, {ok, Ref}}]}; -handle_event({call, From}, {publish_message, ReceiverPid, CommandType, Command}, _, State = #state{channel_pid = ChannelPid}) when is_binary(Command) -> +handle_event({call, From}, {publish_message, ReceiverPid, CommandType, Command}, _, State = #state{channel_pid = ChannelPid}) when is_binary(Command), is_pid(ChannelPid) -> %% 通过websocket发送请求 Ref = ws_channel:publish(ChannelPid, ReceiverPid, <>),