Commit 93e3c3f3 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

SSH: Emit finished() for all running SFTP jobs when the server closes.



Otherwise a crashing SFTP server can leave the client hanging.

Change-Id: Ie96d7a9797074ddea3b50a1788b8ef7cd4bcd5bf
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent 95824dc2
......@@ -832,6 +832,8 @@ SftpChannelPrivate::JobMap::Iterator SftpChannelPrivate::lookupJob(SftpJobId id)
void SftpChannelPrivate::closeHook()
{
for (JobMap::ConstIterator it = m_jobs.constBegin(); it != m_jobs.constEnd(); ++it)
emit finished(it.key(), tr("SFTP channel closed unexpectedly."));
m_jobs.clear();
m_incomingData.clear();
m_incomingPacket.clear();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment