diff --git a/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java b/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java index 87395820..d15c5ea7 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java @@ -225,7 +225,9 @@ protected void gotExtendedData(SSHPacket buf) @Override public void notifyError(SSHException error) { - err.notifyError(error); + if (err != null) { + err.notifyError(error); + } super.notifyError(error); }