Skip to content

Commit

Permalink
Merge pull request #40 from esl/fix-stream-features-for-stattls
Browse files Browse the repository at this point in the history
read stream features after starttls or compresion
  • Loading branch information
erszcz committed Sep 8, 2014
2 parents af0a385 + c0ff4f7 commit ea9d2d3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/escalus_session.erl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ maybe_use_ssl(Conn, Props, Features) ->
case use_ssl(Props, Features) of
true ->
{Conn1, Props1} = starttls(Conn, Props),
{Conn1, Props1, Features};
{Conn2, Props2, Features2} = stream_features(Conn1, Props1, []),
{Conn2, Props2, Features2};
false ->
{Conn, Props, Features}
end.
Expand All @@ -189,7 +190,8 @@ maybe_use_compression(Conn, Props, Features) ->
case can_use_compression(Props, Features) of
true ->
{Conn1, Props1} = compress(Conn, Props),
{Conn1, Props1, Features};
{Conn2, Props2, Features2} = stream_features(Conn1, Props1, []),
{Conn2, Props2, Features2};
false ->
{Conn, Props, Features}
end.
Expand Down

0 comments on commit ea9d2d3

Please sign in to comment.