From 40c620c1ed36285e2336da62030d7296eeb03146 Mon Sep 17 00:00:00 2001 From: Joel Dart Date: Thu, 30 Jul 2015 10:45:07 -0400 Subject: [PATCH] (#198) suppress error if we retry --- SignalR-ObjC.podspec | 2 +- SignalR.Client/Transports/SRServerSentEventsTransport.m | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/SignalR-ObjC.podspec b/SignalR-ObjC.podspec index a152f157..ee160f6b 100644 --- a/SignalR-ObjC.podspec +++ b/SignalR-ObjC.podspec @@ -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}' diff --git a/SignalR.Client/Transports/SRServerSentEventsTransport.m b/SignalR.Client/Transports/SRServerSentEventsTransport.m index 1fa1f74f..c8673edd 100644 --- a/SignalR.Client/Transports/SRServerSentEventsTransport.m +++ b/SignalR.Client/Transports/SRServerSentEventsTransport.m @@ -229,7 +229,7 @@ - (void)open:(id )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]; } }]; @@ -237,6 +237,7 @@ - (void)open:(id )connection connectionData:(NSString *)c } - (void)reconnect:(id )connection data:(NSString *)data { + [connection willReconnect]; __weak __typeof(&*self)weakSelf = self; __weak __typeof(&*connection)weakConnection = connection; [[NSBlockOperation blockOperationWithBlock:^{