mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
try to honor timeout set in request
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36756 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
577652cbc2
commit
4494ace2d5
1 changed files with 5 additions and 5 deletions
|
@ -322,16 +322,16 @@ typedef struct
|
|||
if (nil != conn)
|
||||
{
|
||||
NSRunLoop *loop;
|
||||
NSDate *limit;
|
||||
|
||||
[collector setConnection: conn];
|
||||
loop = [NSRunLoop currentRunLoop];
|
||||
while ([collector done] == NO)
|
||||
{
|
||||
NSDate *limit;
|
||||
limit = [[NSDate alloc] initWithTimeIntervalSinceNow:
|
||||
[request timeoutInterval]];
|
||||
|
||||
limit = [[NSDate alloc] initWithTimeIntervalSinceNow: 1.0];
|
||||
while ([collector done] == NO && [limit timeIntervalSinceNow] > 0.0)
|
||||
{
|
||||
[loop runMode: NSDefaultRunLoopMode beforeDate: limit];
|
||||
RELEASE(limit);
|
||||
}
|
||||
data = [[[collector data] retain] autorelease];
|
||||
if (0 != response)
|
||||
|
|
Loading…
Reference in a new issue