diff --git a/CHANGELOG.md b/CHANGELOG.md index 820e4874..c9f5563f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +- 3.19.1 + - Guard against crashes in `brod_client:get_consumer/3` [PR#581](https://github.com/kafka4beam/brod/pull/581) + - 3.19.0 - Forward unhandled messages in topic/group consumer processes to handle_info/2 callbacks in order to support arbitrary message passing [PR#580](https://github.com/kafka4beam/brod/pull/580) diff --git a/src/brod_client.erl b/src/brod_client.erl index 66f52268..8f4aad24 100644 --- a/src/brod_client.erl +++ b/src/brod_client.erl @@ -493,7 +493,7 @@ get_partition_worker(ClientId, Key) when is_atom(ClientId) -> %% If the worker process is returned form ets, %% but it is not alive then there must be %% an in-flight worker deregistration request. - case is_process_alive(Pid) of + case is_pid(Pid) andalso is_process_alive(Pid) of true -> {ok, Pid}; false -> get_partition_worker_with_ets(ClientId, Key) end;