mirror of
https://git.libssh.org/projects/libssh.git
synced 2025-08-08 19:02:06 +03:00
flush channel after EOF and CLOSE
This commit is contained in:
committed by
Aris Adamantiadis
parent
78ea8608b0
commit
94db978218
@@ -1147,6 +1147,10 @@ int ssh_channel_send_eof(ssh_channel channel){
|
||||
channel->local_channel,
|
||||
channel->remote_channel);
|
||||
|
||||
rc = ssh_channel_flush(channel);
|
||||
if(rc == SSH_ERROR)
|
||||
goto error;
|
||||
|
||||
channel->local_eof = 1;
|
||||
|
||||
return rc;
|
||||
@@ -1203,6 +1207,10 @@ int ssh_channel_close(ssh_channel channel){
|
||||
channel->state=SSH_CHANNEL_STATE_CLOSED;
|
||||
}
|
||||
|
||||
rc = ssh_channel_flush(channel);
|
||||
if(rc == SSH_ERROR)
|
||||
goto error;
|
||||
|
||||
return rc;
|
||||
error:
|
||||
buffer_reinit(session->out_buffer);
|
||||
|
Reference in New Issue
Block a user