diff --git a/src/main/java/net/schmizz/sshj/connection/channel/direct/Session.java b/src/main/java/net/schmizz/sshj/connection/channel/direct/Session.java index b8488be3..9c480c39 100644 --- a/src/main/java/net/schmizz/sshj/connection/channel/direct/Session.java +++ b/src/main/java/net/schmizz/sshj/connection/channel/direct/Session.java @@ -48,18 +48,24 @@ public interface Session /** * If the command exit violently {@link #getExitSignal() with a signal}, an error message would have been * received and can be retrieved via this method. Otherwise, this method will return {@code null}. + *

+ * NOTE: Always call {@link #close()} first before inspecting the exit error message. */ String getExitErrorMessage(); /** * Returns the {@link Signal signal} if the command exit violently, or {@code null} if this information was not * received. + *

+ * NOTE: Always call {@link #close()} first before inspecting the exit signal. */ Signal getExitSignal(); /** * Returns the exit status of the command if it was received, or {@code null} if this information was not * received. + *

+ * NOTE: Always call {@link #close()} first before inspecting the exit status. */ Integer getExitStatus();