From 88ab0ccbb613a7f36020110f32d18b6f95fa433d Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 18 Jun 2015 17:03:28 +0200 Subject: [PATCH] SSH: Fix wrongly emitted assert. Change-Id: Ib19030ccbf708a7ad738df89f3fc0a45b0052bb9 Reviewed-by: hjk --- src/libs/ssh/sshchannel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libs/ssh/sshchannel.cpp b/src/libs/ssh/sshchannel.cpp index 05e3ba78fb2..c816a99e6fb 100644 --- a/src/libs/ssh/sshchannel.cpp +++ b/src/libs/ssh/sshchannel.cpp @@ -262,12 +262,13 @@ void AbstractSshChannel::closeChannel() if (m_state == Inactive) { setChannelState(Closed); } else { + const ChannelState oldState = m_state; setChannelState(CloseRequested); if (m_remoteChannel != NoChannel) { m_sendFacility.sendChannelEofPacket(m_remoteChannel); m_sendFacility.sendChannelClosePacket(m_remoteChannel); } else { - QSSH_ASSERT(m_state == SessionRequested); + QSSH_ASSERT(oldState == SessionRequested); } } }