summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMartin Hurton <hurtonm@gmail.com>2010-07-24 16:57:13 +0200
committerMartin Hurton <hurtonm@gmail.com>2010-07-24 17:19:47 +0200
commite1c596b37eef2c2c72c605d7bf4a5c97050add6b (patch)
tree5d93c230b87bdd0f1fa7fef22b67b43564fb08c2 /src
parent5b1a6a4bea1cebe860769f82702410f6c1d0ab1b (diff)
Make sure lwm > 0 when hwm > 0
Diffstat (limited to 'src')
-rw-r--r--src/pipe.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pipe.cpp b/src/pipe.cpp
index b5c656d..e2c3c4d 100644
--- a/src/pipe.cpp
+++ b/src/pipe.cpp
@@ -341,6 +341,6 @@ uint64_t zmq::pipe_t::compute_lwm (uint64_t hwm_)
if (hwm_ > max_wm_delta * 2)
return hwm_ - max_wm_delta;
else
- return hwm_ / 2;
+ return (hwm_ + 1) / 2;
}