mirror of
https://github.com/gnustep/libs-ec.git
synced 2025-02-22 03:11:16 +00:00
Fix for runaway loop if limitDateForMode: returns nil
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/ec/trunk@40242 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
86d618d0d9
commit
ba46103952
1 changed files with 6 additions and 0 deletions
|
@ -2449,6 +2449,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
NSAutoreleasePool *arp;
|
NSAutoreleasePool *arp;
|
||||||
NSConnection *c;
|
NSConnection *c;
|
||||||
NSRunLoop *loop;
|
NSRunLoop *loop;
|
||||||
|
NSDate *future;
|
||||||
|
|
||||||
arp = [NSAutoreleasePool new];
|
arp = [NSAutoreleasePool new];
|
||||||
if (YES == cmdIsTransient)
|
if (YES == cmdIsTransient)
|
||||||
|
@ -2518,6 +2519,7 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
cmdIsRunning = YES;
|
cmdIsRunning = YES;
|
||||||
|
|
||||||
loop = [NSRunLoop currentRunLoop];
|
loop = [NSRunLoop currentRunLoop];
|
||||||
|
future = [NSDate distantFuture];
|
||||||
while (YES == [EcProcConnection isValid])
|
while (YES == [EcProcConnection isValid])
|
||||||
{
|
{
|
||||||
NS_DURING
|
NS_DURING
|
||||||
|
@ -2526,6 +2528,10 @@ NSLog(@"Ignored attempt to set timer interval to %g ... using 10.0", interval);
|
||||||
|
|
||||||
if (0 == cmdSignalled)
|
if (0 == cmdSignalled)
|
||||||
{
|
{
|
||||||
|
if (nil == d)
|
||||||
|
{
|
||||||
|
d = future;
|
||||||
|
}
|
||||||
[loop acceptInputForMode: NSDefaultRunLoopMode beforeDate: d];
|
[loop acceptInputForMode: NSDefaultRunLoopMode beforeDate: d];
|
||||||
}
|
}
|
||||||
if (0 != cmdSignalled)
|
if (0 != cmdSignalled)
|
||||||
|
|
Loading…
Reference in a new issue