wabbit
wabbit copied to clipboard
Broken match in Wabbit.GenStage.noreply_callback
There is a bug in this function: https://github.com/pma/wabbit/blob/master/lib/wabbit/gen_stage.ex#L271
There is not "module" key in state: https://github.com/pma/wabbit/blob/master/lib/wabbit/gen_stage.ex#L6
Fix could look like this:
defp noreply_callback(callback, args, %__MODULE__{mod: module} = state) do
handle_noreply_callback apply(module, callback, args), state
end
Hint: Using %__MODULE__{} for matches will let the compiler validate keys.