Skip to content

Commit 31ed354

Browse files
Check error stream is not null before notifying error (#961)
Co-authored-by: Jeroen van Erp <[email protected]>
1 parent f4f8071 commit 31ed354

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/java/net/schmizz/sshj/connection/channel/direct/SessionChannel.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,9 @@ protected void gotExtendedData(SSHPacket buf)
225225

226226
@Override
227227
public void notifyError(SSHException error) {
228-
err.notifyError(error);
228+
if (err != null) {
229+
err.notifyError(error);
230+
}
229231
super.notifyError(error);
230232
}
231233

0 commit comments

Comments
 (0)