Skip to content
This repository has been archived by the owner on May 21, 2022. It is now read-only.

Document that by default you will receive tcp messages in the process that calls Mojito.request #18

Closed
axelson opened this issue Apr 24, 2019 · 2 comments

Comments

@axelson
Copy link

axelson commented Apr 24, 2019

From a slack discussion with @gamache

gamache [9 hours ago]
That's correct, the caller process will receive messages of the form {:tcp, _, _} and {:ssl, _, _} and handle them transparently.

gamache [9 hours ago]
Other messages will be left in the mailbox, which should keep most callers out of trouble, but if other TCP/SSL messages were expected, Mojito will gobble them up. In that case, wrap the one-off request in a Task or use Mojito.Pool to make requests.

I think this should be called out on the docs at https://hexdocs.pm/mojito/0.2.1/Mojito.html#request/1 and https://hexdocs.pm/mojito/0.2.1/Mojito.html#request/5

And the module doc could probably be a little more explicit as well.

@gamache
Copy link
Contributor

gamache commented Apr 25, 2019

You're absolutely right, I will document this better. It's in the module docs, but I will add it to the function docs as well.

gamache added a commit that referenced this issue Apr 25, 2019
@axelson
Copy link
Author

axelson commented Apr 25, 2019

Great, thanks!

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