<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -68,14 +68,13 @@ static NSMutableArray *activeDelegates;
 	NSURLConnection *connection = [[[NSURLConnection alloc] initWithRequest:request delegate:connectionDelegate startImmediately:NO] autorelease];
 	connectionDelegate.connection = connection;
 
-	NSRunLoop* runLoop = [NSRunLoop mainRunLoop];
 	
-	//This needs to run in the main run loop in the default mode
-	[connection unscheduleFromRunLoop:[NSRunLoop currentRunLoop] forMode:NSDefaultRunLoopMode];
-	[connection scheduleInRunLoop:runLoop forMode:NSDefaultRunLoopMode];
+	//use a custom runloop
+	static NSString *runLoopMode = @&quot;com.yfactorial.objectiveresource.connectionLoop&quot;;
+	[connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:runLoopMode];
 	[connection start];
 	while (![connectionDelegate isDone]) {
-		[runLoop runUntilDate:[NSDate dateWithTimeIntervalSinceNow:.3]];
+		[[NSRunLoop currentRunLoop] runMode:runLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceNow:.3]];
 	}
 	Response *resp = [Response responseFrom:(NSHTTPURLResponse *)connectionDelegate.response 
 								   withBody:connectionDelegate.data </diff>
      <filename>Classes/lib/Connection.m</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>949e4dc87d9e60ad1265465fa0d67874301c0786</id>
    </parent>
  </parents>
  <author>
    <name>vickeryj</name>
    <email>vickeryj@j-macbook.local</email>
  </author>
  <url>http://github.com/yfactorial/objectiveresource/commit/7573de144e550f23f0a6b0a1b648653581bb53b6</url>
  <id>7573de144e550f23f0a6b0a1b648653581bb53b6</id>
  <committed-date>2009-02-10T12:59:06-08:00</committed-date>
  <authored-date>2009-02-10T12:59:06-08:00</authored-date>
  <message>[#39] brilliant find Adam! using a custom run loop mode seems to take care of this problem</message>
  <tree>a2e295b7b892482f2e7bb0e1d2d3771fa79fe5b0</tree>
  <committer>
    <name>vickeryj</name>
    <email>vickeryj@j-macbook.local</email>
  </committer>
</commit>
