1
0
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:
Aris Adamantiadis
2009-08-16 13:51:55 +02:00
parent 380a70d650
commit e707af1cd7

View File

@@ -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;
}
}