aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/channels.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/channels.c b/src/channels.c
index 74aef62c..23666137 100644
--- a/src/channels.c
+++ b/src/channels.c
@@ -350,8 +350,13 @@ pending:
}
end:
+ /* This needs to pass the SSH_AGAIN from the above,
+ * but needs to catch failed channel states */
if (channel->state == SSH_CHANNEL_STATE_OPEN) {
err = SSH_OK;
+ } else if (err != SSH_AGAIN) {
+ /* Messages were handled correctly, but he channel state is invalid */
+ err = SSH_ERROR;
}
return err;