mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-11-29 01:03:57 +03:00
session: Handle session state in ssh_get_status().
BUG: https://red.libssh.org/issues/109
This commit is contained in:
@@ -586,7 +586,8 @@ int ssh_get_status(ssh_session session) {
|
|||||||
if (socketstate & SSH_WRITE_PENDING) {
|
if (socketstate & SSH_WRITE_PENDING) {
|
||||||
r |= SSH_WRITE_PENDING;
|
r |= SSH_WRITE_PENDING;
|
||||||
}
|
}
|
||||||
if (session->closed && (socketstate & SSH_CLOSED_ERROR)) {
|
if (session->closed && (socketstate & SSH_CLOSED_ERROR) ||
|
||||||
|
session->session_state == SSH_SESSION_STATE_ERROR) {
|
||||||
r |= SSH_CLOSED_ERROR;
|
r |= SSH_CLOSED_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user