ssh_terminal: flush before closing connection

Originally the outgoing buffer was flush when the terminal was
detached. Since we cannot do that at this point, make the flushing
part of the common cleanup procedure.

Issue #3682.
This commit is contained in:
Josef Söntgen 2020-11-17 14:37:55 +01:00 committed by Christian Helmuth
parent 551b17591c
commit dbcb1ff480

View File

@ -193,6 +193,7 @@ void Ssh::Server::_cleanup_session(Session &s)
ssh_channel_free(s.channel);
s.channel = nullptr;
ssh_blocking_flush(s.session, 5*1000);
ssh_event_remove_session(_event_loop, s.session);
ssh_disconnect(s.session);
ssh_free(s.session);