i need let genserver
monitor task, thus, do:
genserver.call(server_pid, {:monitor_task, self()})
in server:
def handle_call({:monitor_task, task_pid}, _from, state) ref = process.monitor(task_pid) {:reply, ref, state} end
however, error:
** (stop) exited in: genserver.call(#pid<0.768.0>, {:monitor_task, #pid<0.849.0>}, 5000) ** (exit) bad return value: :ok
any idea?
the handle_info
callbacks calls logger need return {:noreply, state}
or {:stop, reason, state}
, calls logger return :ok
, invalid return value callback, , caused error seeing.
Comments
Post a Comment