Author: gnodet
Date: Wed Aug 31 08:43:37 2011
New Revision: 1163528

URL: http://svn.apache.org/viewvc?rev=1163528&view=rev
Log:
[SSHD-122] Messages sent after SSH_MSG_CHANNEL_CLOSE is sent

Modified:
    
mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java

Modified: 
mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
URL: 
http://svn.apache.org/viewvc/mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java?rev=1163528&r1=1163527&r2=1163528&view=diff
==============================================================================
--- 
mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
 (original)
+++ 
mina/sshd/trunk/sshd-core/src/main/java/org/apache/sshd/server/channel/ChannelSession.java
 Wed Aug 31 08:43:37 2011
@@ -536,10 +536,12 @@ public class ChannelSession extends Abst
     }
 
     protected void closeShell(int exitValue) throws IOException {
-        sendEof();
-        sendExitStatus(exitValue);
-        // TODO: We should wait for all streams to be consumed before closing 
the channel
-        close(false);
+        if (!closing) {
+            sendEof();
+            sendExitStatus(exitValue);
+            // TODO: We should wait for all streams to be consumed before 
closing the channel
+            close(false);
+        }
     }
 
 }
\ No newline at end of file


Reply via email to