Skip to content

Agent update #4

Description

@cskaandorp

Hi @mugimaru,

Thanks for making this package. I think I have an issue, provided I didn't make a mistake. I need to update my Client on the fly and thus use an Agent as described in https://hexdocs.pm/webdavex/Webdavex.Agent.html. But when I update like in the example I get an error:

[error] GenServer CoastSnap.GenServers.YodaTransfer terminating
** (FunctionClauseError) no function clause matching in Agent.update/3

Whatever I tried, I still got all kinds of other errors. After some digging I was able to bypass this problem by updating the agent like this:

Agent.update(agent, (fn _state -> new_config end))

where agent is the pid of the client and new_config is a new Webdavex config struct. I am not wel versed in Elixir, but to me it seems your code doesn't have a clause which explicitly sends a function to Agent.update. Anyways, this might be BS.

Is this a bug or did I do something wrong?

Thanks,

Cspr

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions