Skip to content
Browse files

Collapse guards to patterns to eliminate warnings.

  • Loading branch information...
1 parent cc54405 commit fa1bce12476efc5e60200aa1a10d393ddfcba2b7 @archaelus archaelus committed Jun 14, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 src/cowboy_client.erl
View
5 src/cowboy_client.erl
@@ -73,10 +73,9 @@ close(#client{transport=Transport, socket=Socket}) ->
connect(Transport, Host, Port, Client)
when is_binary(Host) ->
connect(Transport, binary_to_list(Host), Port, Client);
-connect(Transport, Host, Port, Client=#client{state=State, opts=Opts})
+connect(Transport, Host, Port, Client=#client{state=wait, opts=Opts})
when is_atom(Transport), is_list(Host),
- is_integer(Port), is_record(Client, client),
- State =:= wait ->
+ is_integer(Port) ->
case Transport:connect(Host, Port, Opts) of
{ok, Socket} ->
{ok, Client#client{state=request,

0 comments on commit fa1bce1

Please sign in to comment.
Something went wrong with that request. Please try again.