Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
terrafrost committed Jan 14, 2025
1 parent edbfbd4 commit ee72372
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions phpseclib/Net/SSH2.php
Original file line number Diff line number Diff line change
Expand Up @@ -4182,10 +4182,12 @@ protected function get_channel_packet($client_channel, $skip_extended = false)
$this->errors[count($this->errors) - 1] .= "\r\n$error_message";
}

$this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$client_channel]));
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel]));
if (isset($this->server_channels[$channel])) {
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_EOF, $this->server_channels[$channel]));
$this->send_binary_packet(pack('CN', NET_SSH2_MSG_CHANNEL_CLOSE, $this->server_channels[$channel]));

$this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
$this->channel_status[$channel] = NET_SSH2_MSG_CHANNEL_CLOSE;
}

continue 3;
case 'exit-status':
Expand Down

0 comments on commit ee72372

Please sign in to comment.