diff options
author | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-06-01 07:58:03 +0300 |
---|---|---|
committer | Evgeniy Khramtsov <ekhramtsov@process-one.net> | 2018-06-01 07:58:03 +0300 |
commit | 4fc8d1c4a4c61ab9a9e59697bf1072cbc2135461 (patch) | |
tree | 7aa027a2a6bd0dbfd14c8f69b79d8fca550784b7 /src | |
parent | Improve indentation (diff) |
Send trailer and close socket explicitly on stream end
Diffstat (limited to 'src')
-rw-r--r-- | src/xmpp_stream_out.erl | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/xmpp_stream_out.erl b/src/xmpp_stream_out.erl index da0a14e22..bff50d30d 100644 --- a/src/xmpp_stream_out.erl +++ b/src/xmpp_stream_out.erl @@ -459,8 +459,7 @@ process_invalid_xml(#{lang := MyLang} = State, El, Reason) -> process_stream_end(_, #{stream_state := disconnected} = State) -> State; process_stream_end(Reason, State) -> - State1 = State#{stream_timeout => infinity, - stream_state => disconnected}, + State1 = send_trailer(State), try callback(handle_stream_end, Reason, State1) catch _:{?MODULE, undef} -> stop(State1) end. |