From 0f75458a9c40dcfde73bd2b0d81185f89456df23 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 3 Jun 2014 13:11:34 +0200 Subject: Make sure the host value is of the correct type in open --- src/gun.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gun.erl b/src/gun.erl index 8f056aa..4c60045 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -110,7 +110,7 @@ open(Host, Port) -> -spec open(inet:hostname(), inet:port_number(), opts()) -> {ok, pid()} | {error, any()}. -open(Host, Port, Opts) -> +open(Host, Port, Opts) when is_list(Host); is_atom(Host) -> case open_opts(Opts) of ok -> supervisor:start_child(gun_sup, [self(), Host, Port, Opts]); -- cgit v1.2.3