Permalink
Browse files

return updated client, set to wait, after socket close

  • Loading branch information...
1 parent fa1bce1 commit 3df2178b78084a25d45040158b0a70c50f4646b7 @tsloughter committed Jul 9, 2012
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/cowboy_client.erl
@@ -67,8 +67,9 @@ transport(#client{transport=Transport, socket=Socket}) ->
close(#client{socket=undefined}) ->
{error, notconnected};
-close(#client{transport=Transport, socket=Socket}) ->
- Transport:close(Socket).
+close(Client=#client{transport=Transport, socket=Socket}) ->
+ Transport:close(Socket),
+ {ok, Client#client{state=wait}}.
connect(Transport, Host, Port, Client)
when is_binary(Host) ->

0 comments on commit 3df2178

Please sign in to comment.