summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2014-09-04 01:36:56 +0000
committerChris Wilson <chris+github@qwirx.com>2014-09-04 01:36:56 +0000
commitc924af26fdd046d158fd50575583ea6a31e725ea (patch)
tree6c1b4f986efda4c195d8001e08813b5c3c6d7162 /lib
parentbe3a14f5f223f7997f3f44bddf5a13fcc44b8c59 (diff)
Add missing timeouts in StreamableMemBlock::Set and testbbackupd.
Reduces warnings about network operations with no timeout. May prevent some hangs that might have occurred waiting forever for network data in the past.
Diffstat (limited to 'lib')
-rw-r--r--lib/common/StreamableMemBlock.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/common/StreamableMemBlock.cpp b/lib/common/StreamableMemBlock.cpp
index be3d0031..9abf78d3 100644
--- a/lib/common/StreamableMemBlock.cpp
+++ b/lib/common/StreamableMemBlock.cpp
@@ -125,7 +125,9 @@ void StreamableMemBlock::Set(IOStream &rStream, int Timeout)
try
{
// Read in
- if(!rStream.ReadFullBuffer(pblock, size, 0 /* not interested in bytes read if this fails */))
+ if(!rStream.ReadFullBuffer(pblock, size,
+ 0 /* not interested in bytes read if this fails */,
+ Timeout))
{
THROW_EXCEPTION(CommonException, StreamableMemBlockIncompleteRead)
}