bbukowski
Joined: 21 Jan 2007 Posts: 1
|
Posted: Sun Jan 21, 2007 3:46 pm Post subject: HttpClient "Error: truncated response" Fix |
|
|
Hi,
setting tv.tv_usec to more than 1000000 does not work on my Linux Box.
HttpClient try's to set it to 3000000 and so select returns immediately.
Boris
Index: mango/io/Socket.d
===================================================================
--- mango/io/Socket.d (revision 935)
+++ mango/io/Socket.d (working copy)
@@ -884,8 +884,8 @@
void setTimeout (uint us)
{
- tv.tv_sec = 0;
- tv.tv_usec = us;
+ tv.tv_sec = us / 1000000;
+ tv.tv_usec = us ? 1000000;
}
/*********************************************************************** |
|