diff options
| author | Renato Westphal <renato@openbsd.org> | 2017-10-23 21:54:09 -0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-10-23 21:54:09 -0200 |
| commit | a81c0c948cb8a6421b8560e983ac8bec5c95d782 (patch) | |
| tree | da4f1cd0e79dd3a84b42034eb9a41bb298635132 /lib/buffer.c | |
| parent | ccd05df5d37bf0381f71fcb7e40fae937a7efbb2 (diff) | |
| parent | afb6d3f5c1bc66c64b956e575fbf87f6a6804456 (diff) | |
Merge pull request #1330 from donaldsharp/zclient_shenanigans
Zclient shenanigans
Diffstat (limited to 'lib/buffer.c')
| -rw-r--r-- | lib/buffer.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/buffer.c b/lib/buffer.c index a7c4fe4f2f..191fbf875a 100644 --- a/lib/buffer.c +++ b/lib/buffer.c @@ -482,12 +482,14 @@ buffer_status_t buffer_write(struct buffer *b, int fd, const void *p, ssize_t nbytes; #if 0 - /* Should we attempt to drain any previously buffered data? This could help - reduce latency in pushing out the data if we are stuck in a long-running - thread that is preventing the main select loop from calling the flush - thread... */ - if (b->head && (buffer_flush_available(b, fd) == BUFFER_ERROR)) - return BUFFER_ERROR; + /* + * Should we attempt to drain any previously buffered data? + * This could help reduce latency in pushing out the data if + * we are stuck in a long-running thread that is preventing + * the main select loop from calling the flush thread... + */ + if (b->head && (buffer_flush_available(b, fd) == BUFFER_ERROR)) + return BUFFER_ERROR; #endif if (b->head) /* Buffer is not empty, so do not attempt to write the new data. |
