This commit is contained in:
anlicheng 2025-05-20 18:51:18 +08:00
parent 5787f797c3
commit a5b647e0e2

View File

@ -52,7 +52,9 @@ async_call_reply(undefined, PacketId, Response) when is_integer(PacketId), is_bi
async_call_reply(Pid, PacketId, Response) when is_pid(Pid), is_integer(PacketId), is_binary(Response) -> async_call_reply(Pid, PacketId, Response) when is_pid(Pid), is_integer(PacketId), is_binary(Response) ->
gen_server:cast(Pid, {async_call_reply, PacketId, Response}). gen_server:cast(Pid, {async_call_reply, PacketId, Response}).
-spec stop(Pid :: pid()) -> ok. -spec stop(Pid :: pid() | undefined) -> ok.
stop(undefined) ->
ok;
stop(Pid) when is_pid(Pid) -> stop(Pid) when is_pid(Pid) ->
gen_server:stop(Pid, normal, 2000). gen_server:stop(Pid, normal, 2000).