mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-05 04:40:31 +09:00
channels: Don't call ssh_channel_close() twice
Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 6cd8d4a24a)
This commit is contained in:
@@ -1160,6 +1160,11 @@ int ssh_channel_close(ssh_channel channel)
|
||||
return SSH_ERROR;
|
||||
}
|
||||
|
||||
/* If the channel close has already been sent we're done here. */
|
||||
if (channel->flags & SSH_CHANNEL_FLAG_CLOSED_LOCAL) {
|
||||
return SSH_OK;
|
||||
}
|
||||
|
||||
session = channel->session;
|
||||
|
||||
if (channel->local_eof == 0) {
|
||||
|
||||
Reference in New Issue
Block a user