Flush output buffers in the tap reader thread on Windows.

This is basically a port of commit 50fcfea1 to 1.1.
This commit is contained in:
Guus Sliepen 2013-03-01 17:15:26 +01:00
parent 4d05e695ab
commit f9ab8e266b
4 changed files with 11 additions and 0 deletions

View file

@ -349,6 +349,9 @@ static void do_outgoing_pipe(connection_t *c, char *command) {
}
static void handle_meta_write(connection_t *c) {
if(c->outbuf.len <= c->outbuf.offset)
return;
ssize_t outlen = send(c->socket, c->outbuf.data + c->outbuf.offset, c->outbuf.len - c->outbuf.offset, 0);
if(outlen <= 0) {
if(!errno || errno == EPIPE) {