commit ef70bd4a40def77aedf73b93368d0cc8b43871af Author: Oswald Buddenhagen <o...@users.sf.net> Date: Sun Feb 15 11:39:38 2015 +0100
don't try to flush if there is nothing to flush zlib reports Z_BUF_ERROR when a flush is attempted without any activity since the previous flush (if any). while this is harmless as such, discerning the condition from genuine errors would be much harder than avoiding the pointless flush in the first place. REFMAIL: eb5681612f17be777bc8d138d31dd...@mpcjanssen.nl src/socket.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/socket.c b/src/socket.c index 56e041a..b376d73 100644 --- a/src/socket.c +++ b/src/socket.c @@ -812,7 +812,7 @@ socket_write( conn_t *conn, conn_iovec_t *iov, int iovcnt ) for (i = 0; i < iovcnt; i++) total += iov[i].len; - if (total >= WRITE_CHUNK_SIZE) { + if (total >= WRITE_CHUNK_SIZE && pending_wakeup( &conn->fd_fake )) { /* If the new data is too big, queue the pending buffer to avoid latency. */ do_flush( conn ); } ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel