mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
Fix channel_get_exit_status bug reported by VicLee
It would return -1 if the channel received the exit status and the close message at same time.
This commit is contained in:
@@ -1793,7 +1793,9 @@ int channel_get_exit_status(ssh_channel channel) {
|
||||
return -1;
|
||||
}
|
||||
if (channel->open == 0) {
|
||||
return -1;
|
||||
/* When a channel is closed, no exit status message can
|
||||
* come anymore */
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user