summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/ConnectionFileDescriptor.cpp
diff options
context:
space:
mode:
authorGreg Clayton <gclayton@apple.com>2012-01-21 02:28:13 +0000
committerGreg Clayton <gclayton@apple.com>2012-01-21 02:28:13 +0000
commit3af493f068d8d1292c83eefa043ab65f3c1ce751 (patch)
treec3768d6703cdbb8ffae456ab3e03e41c715ed5d7 /lldb/source/Core/ConnectionFileDescriptor.cpp
parentc668f81107d3a5580bf0457a397cbe650f74e8a0 (diff)
downloadbcm5719-llvm-3af493f068d8d1292c83eefa043ab65f3c1ce751.tar.gz
bcm5719-llvm-3af493f068d8d1292c83eefa043ab65f3c1ce751.zip
<rdar://problem/10711649>
A Small tweak to handle a zero timeout. llvm-svn: 148617
Diffstat (limited to 'lldb/source/Core/ConnectionFileDescriptor.cpp')
-rw-r--r--lldb/source/Core/ConnectionFileDescriptor.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/lldb/source/Core/ConnectionFileDescriptor.cpp b/lldb/source/Core/ConnectionFileDescriptor.cpp
index 1a455f1b5f2..6069f8beec5 100644
--- a/lldb/source/Core/ConnectionFileDescriptor.cpp
+++ b/lldb/source/Core/ConnectionFileDescriptor.cpp
@@ -988,6 +988,13 @@ ConnectionFileDescriptor::SetSocketReceiveTimeout (uint32_t timeout_usec)
timeout.tv_sec = 0;
timeout.tv_usec = 0;
}
+ else if (timeout_usec == 0)
+ {
+ // Sending in zero does an infinite timeout, so set this as low
+ // as we can go to get an effective zero timeout...
+ timeout.tv_sec = 0;
+ timeout.tv_usec = 1;
+ }
else
{
timeout.tv_sec = timeout_usec / TimeValue::MicroSecPerSec;
OpenPOWER on IntegriCloud