Skip to content

Commit

Permalink
(#198) suppress error if we retry
Browse files Browse the repository at this point in the history
  • Loading branch information
joeldart committed Jul 30, 2015
1 parent abc26be commit 40c620c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion SignalR-ObjC.podspec
Expand Up @@ -5,7 +5,7 @@ Pod::Spec.new do |s|
s.homepage = "https://github.com/DyKnow/SignalR-ObjC"
s.license = 'MIT'
s.author = { "Alex Billingsley" => "abillingsley@dyknow.com" }
s.source = { :git => 'https://github.com/DyKnow/SignalR-ObjC.git' }
s.source = { :git => 'https://github.com/DyKnow/SignalR-ObjC.git', :tag => '2.0.0.beta1' }
s.ios.deployment_target = '6.0'
s.osx.deployment_target = '10.8'
s.source_files = 'SignalR.Client/**/*.{h,m}'
Expand Down
3 changes: 2 additions & 1 deletion SignalR.Client/Transports/SRServerSentEventsTransport.m
Expand Up @@ -229,14 +229,15 @@ - (void)open:(id <SRConnectionInterface>)connection connectionData:(NSString *)c
strongSelf.completionHandler(nil, error);
strongSelf.completionHandler = nil;
} else if (!_stop) {
[strongConnection didReceiveError:error];
SRLogServerSentEvents("reconnect from errors: %@", error);
[strongSelf reconnect:strongConnection data:connectionData];
}
}];
[self.serverSentEventsOperationQueue addOperation:operation];
}

- (void)reconnect:(id <SRConnectionInterface>)connection data:(NSString *)data {
[connection willReconnect];
__weak __typeof(&*self)weakSelf = self;
__weak __typeof(&*connection)weakConnection = connection;
[[NSBlockOperation blockOperationWithBlock:^{
Expand Down

0 comments on commit 40c620c

Please sign in to comment.