aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2014-03-23 21:19:07 +0100
committerLoïc Hoguin <[email protected]>2014-03-23 21:19:07 +0100
commit3f0e98709fd10f22b62c49e7207484d568276caf (patch)
treed7de61720067c35130767308f7437b131d5bbf9a /src
parent26ef371ec4e0c8f2b6132c7e46d1b8b8b1992b7d (diff)
downloadgun-3f0e98709fd10f22b62c49e7207484d568276caf.tar.gz
gun-3f0e98709fd10f22b62c49e7207484d568276caf.tar.bz2
gun-3f0e98709fd10f22b62c49e7207484d568276caf.zip
Fix crashes when Transport:setopts/2 returned an error
For some reason this only happened with SSL. I suppose the behavior is a little different from TCP.
Diffstat (limited to 'src')
-rw-r--r--src/gun.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gun.erl b/src/gun.erl
index 8834f4d..d751b59 100644
--- a/src/gun.erl
+++ b/src/gun.erl
@@ -406,7 +406,7 @@ loop(State=#state{parent=Parent, owner=Owner, host=Host,
retry=Retry, socket=Socket, transport=Transport,
protocol=Protocol, protocol_state=ProtoState}) ->
{OK, Closed, Error} = Transport:messages(),
- ok = Transport:setopts(Socket, [{active, once}]),
+ Transport:setopts(Socket, [{active, once}]),
receive
{OK, Socket, Data} ->
case Protocol:handle(Data, ProtoState) of