mirror of
https://github.com/clearml/dropbear
synced 2025-01-31 19:07:28 +00:00
Check that the output circular buffer is actually empty before
closing the channel (thanks to Tomas Vanek for his help). --HG-- extra : convert_revision : 7fb3ca52f21072127c9615a5bdbc054c24669e51
This commit is contained in:
parent
bf045a0564
commit
b05ab854ae
@ -377,7 +377,7 @@ static void writechannel(struct Channel* channel, int fd, circbuffer *cbuf) {
|
||||
cbuf_incrread(cbuf, len);
|
||||
channel->recvdonelen += len;
|
||||
|
||||
if (fd == channel->writefd && len == maxlen && channel->recveof) {
|
||||
if (fd == channel->writefd && cbuf_getused(cbuf) == 0 && channel->recveof) {
|
||||
/* Check if we're closing up */
|
||||
closewritefd(channel);
|
||||
TRACE(("leave writechannel: recveof set"))
|
||||
|
Loading…
Reference in New Issue
Block a user