Skip to content
This repository was archived by the owner on Jan 26, 2026. It is now read-only.

Commit fded1fb

Browse files
committed
channels: Don't call ssh_channel_close() twice
Signed-off-by: Andreas Schneider <asn@cryptomilk.org> (cherry picked from commit 6cd8d4a)
1 parent a6e055c commit fded1fb

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/channels.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,11 @@ int ssh_channel_close(ssh_channel channel)
11601160
return SSH_ERROR;
11611161
}
11621162

1163+
/* If the channel close has already been sent we're done here. */
1164+
if (channel->flags & SSH_CHANNEL_FLAG_CLOSED_LOCAL) {
1165+
return SSH_OK;
1166+
}
1167+
11631168
session = channel->session;
11641169

11651170
if (channel->local_eof == 0) {

0 commit comments

Comments
 (0)