Skip to content

Commit

Permalink
Merge pull request gandg#2 from YK-Unit/issue_2
Browse files Browse the repository at this point in the history
fix bug:issue_2
  • Loading branch information
Gregg Ganley committed Mar 6, 2014
2 parents b60e636 + 037d186 commit 78ecd59
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions ios-example/AppRTCDemo/APPRTCAppClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ - (void)updateICEServers:(NSMutableArray *)ICEServers
withTurnServer:(NSString *)turnServerUrl {
if ([turnServerUrl length] < 1) {
[self.ICEServerDelegate onICEServers:ICEServers];

self.gaeChannel = [[GAEChannelClient alloc] initWithToken:self.token delegate:self.messageHandler];
return;
}
dispatch_async(self.backgroundQueue, ^(void) {
Expand Down Expand Up @@ -242,6 +244,8 @@ - (void)updateICEServers:(NSMutableArray *)ICEServers

dispatch_async(dispatch_get_main_queue(), ^(void) {
[self.ICEServerDelegate onICEServers:ICEServers];

self.gaeChannel = [[GAEChannelClient alloc] initWithToken:self.token delegate:self.messageHandler];
});
});
}
Expand Down Expand Up @@ -350,9 +354,8 @@ - (void)connectionDidFinishLoading:(NSURLConnection *)connection {
[self maybeLogMessage:
[NSString stringWithFormat:@"About to open GAE with token: %@",
self.token]];
self.gaeChannel =
[[GAEChannelClient alloc] initWithToken:self.token
delegate:self.messageHandler];

//self.gaeChannel = [[GAEChannelClient alloc] initWithToken:self.token delegate:self.messageHandler];
}

@end

0 comments on commit 78ecd59

Please sign in to comment.