]> git.puffer.fish Git - mirror/frr.git/commit
lib/vty: don't clear output buffer on input EOF
authorDavid Lamparter <equinox@opensourcerouting.org>
Thu, 14 May 2015 12:24:06 +0000 (14:24 +0200)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 8 Jun 2016 19:10:54 +0000 (15:10 -0400)
commit009a4a07ff1f8188c9e3e7ae39f08a0501653af7
tree16774e103f1c9949e073121749329f472770410f
parentdbf78092dae5717334dbb0f20fa540a47fbebb70
lib/vty: don't clear output buffer on input EOF

A VTY's input can be closed without the output becoming unavailable.
This happens both on stdio when stdin ends, as well as over TCP when an
unidirectional input shutdown() happens.

In such a case, resetting the output buffer is not appropriate since
there might still be data to be successfully written.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
lib/vty.c