Skip to content
This repository has been archived by the owner on Jan 20, 2023. It is now read-only.

Options to Spell.connect/2 are ignored #52

Open
clayrichardson opened this issue May 5, 2017 · 5 comments
Open

Options to Spell.connect/2 are ignored #52

clayrichardson opened this issue May 5, 2017 · 5 comments

Comments

@clayrichardson
Copy link

This value seems to be ignored: https://github.com/MyMedsAndMe/spell/blob/master/lib/spell.ex#L125

@jtmoulia
Copy link
Contributor

jtmoulia commented May 5, 2017

True! Happy to look at a PR for this, otherwise I'll get to it in the next 2 weeks.

Thanks for the report, @clayrichardson

@clayrichardson
Copy link
Author

No problem, I was trying to figure out the best way to fix this, but I am unsure :)

@clayrichardson clayrichardson changed the title Timeout option to Spell.connect/2 is ignored Options to Spell.connect/2 are ignored May 6, 2017
@clayrichardson
Copy link
Author

I also noticed that when a timeout error happens, there is no retry, thus this seems to be ignored as well:
https://github.com/MyMedsAndMe/spell/blob/master/lib/spell.ex#L103

@jtmoulia
Copy link
Contributor

jtmoulia commented May 6, 2017

😊 🐛 -- thanks!

@clayrichardson
Copy link
Author

clayrichardson commented May 6, 2017

Also, I'm not sure if I'm using this lib properly, as I put Spell.connect into my own connect/1 function inside a GenServer, and case on Spell.connect. On {:error, timeout} I call my connect/1 again, but it seems to spawn multiple PIDs which send messages to my GenServer's handle_info callback. So it might be retrying somewhere after the lib returns the timeout error.

Maybe this will help, I'm new to Elixir, so I'm probably doing something wrong here: https://github.com/clayrichardson/spell-issue-example/blob/master/lib/ingestory/worker.ex

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants