Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

always return updated Client with state set to wait for close function

  • Loading branch information...
commit 046e00ac3abcb7c03a690b18a79034b5404faddd 1 parent 4892f24
@tsloughter authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/cowboy_client.erl
View
4 src/cowboy_client.erl
@@ -65,8 +65,8 @@ transport(#client{socket=undefined}) ->
transport(#client{transport=Transport, socket=Socket}) ->
{ok, Transport, Socket}.
-close(#client{socket=undefined}) ->
- {error, notconnected};
+close(Client=#client{socket=undefined}) ->
+ {ok, Client#client{state=wait}};
close(Client=#client{transport=Transport, socket=Socket}) ->
Transport:close(Socket),
{ok, Client#client{state=wait}}.
Please sign in to comment.
Something went wrong with that request. Please try again.