Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

return updated client, set to wait, after socket close

  • Loading branch information...
commit 3df2178b78084a25d45040158b0a70c50f4646b7 1 parent fa1bce1
@tsloughter authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 src/cowboy_client.erl
View
5 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) ->
Please sign in to comment.
Something went wrong with that request. Please try again.