mirror of
https://github.com/hierynomus/sshj.git
synced 2025-12-06 23:30:55 +03:00
SessionChannel should override notifyError() in order to notify the stderr stream
This commit is contained in:
@@ -35,10 +35,7 @@
|
|||||||
*/
|
*/
|
||||||
package net.schmizz.sshj.connection.channel.direct;
|
package net.schmizz.sshj.connection.channel.direct;
|
||||||
|
|
||||||
import net.schmizz.sshj.common.Buffer;
|
import net.schmizz.sshj.common.*;
|
||||||
import net.schmizz.sshj.common.IOUtils;
|
|
||||||
import net.schmizz.sshj.common.SSHPacket;
|
|
||||||
import net.schmizz.sshj.common.StreamCopier;
|
|
||||||
import net.schmizz.sshj.connection.Connection;
|
import net.schmizz.sshj.connection.Connection;
|
||||||
import net.schmizz.sshj.connection.ConnectionException;
|
import net.schmizz.sshj.connection.ConnectionException;
|
||||||
import net.schmizz.sshj.connection.channel.ChannelInputStream;
|
import net.schmizz.sshj.connection.channel.ChannelInputStream;
|
||||||
@@ -50,7 +47,9 @@ import java.util.Collections;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.concurrent.TimeUnit;
|
import java.util.concurrent.TimeUnit;
|
||||||
|
|
||||||
/** {@link Session} implementation. */
|
/**
|
||||||
|
* {@link Session} implementation.
|
||||||
|
*/
|
||||||
public class
|
public class
|
||||||
SessionChannel
|
SessionChannel
|
||||||
extends AbstractDirectChannel
|
extends AbstractDirectChannel
|
||||||
@@ -171,7 +170,7 @@ public class
|
|||||||
@Override
|
@Override
|
||||||
public void reqX11Forwarding(String authProto, String authCookie, int screen)
|
public void reqX11Forwarding(String authProto, String authCookie, int screen)
|
||||||
throws ConnectionException,
|
throws ConnectionException,
|
||||||
TransportException {
|
TransportException {
|
||||||
sendChannelRequest(
|
sendChannelRequest(
|
||||||
"x11-req",
|
"x11-req",
|
||||||
true,
|
true,
|
||||||
@@ -238,4 +237,10 @@ public class
|
|||||||
super.gotExtendedData(dataTypeCode, buf);
|
super.gotExtendedData(dataTypeCode, buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void notifyError(SSHException error) {
|
||||||
|
err.notifyError(error);
|
||||||
|
super.notifyError(error);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user