lgoldstein commented on a change in pull request #214:
URL: https://github.com/apache/mina-sshd/pull/214#discussion_r839815525



##########
File path: 
sshd-core/src/main/java/org/apache/sshd/common/channel/ChannelOutputStream.java
##########
@@ -195,9 +195,7 @@ public synchronized void write(byte[] buf, int s, int l) 
throws IOException {
     public synchronized void flush() throws IOException {
         Channel channel = getChannel();
         if (!isOpen()) {

Review comment:
       I don't think this is a good idea - what if the user meant to flush the 
stream but did not notice it is closed. The code would simply "swallow" the 
exception. AFAIK the stream contract is clear: do not call **any** method after 
calling *close()* (one *can* call *close()* as many times as one wants since it 
is idempotent),




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to