X-Git-Url: https://www.tinc-vpn.org/git/browse?a=blobdiff_plain;f=src%2Fnet_socket.c;h=0ee365538be3c8248b721d8a70c934b0d85b7b6d;hb=f9ab8e266b93aa3be772374ef4a8fdb06e376568;hp=a28be54a62e2511679a578f7186056c265b86220;hpb=4d05e695ab68a16cc5ed853b50482c443c6e12a9;p=tinc diff --git a/src/net_socket.c b/src/net_socket.c index a28be54a..0ee36553 100644 --- a/src/net_socket.c +++ b/src/net_socket.c @@ -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) {